Update obsolete email address...
[openssl.git] / crypto / rsa / rsa_depr.c
index 73fa6eea90742cdca37555ad231110f91aa4f4ca..a859ded987a28761a6f5f455ee0b2e8df87633e6 100644 (file)
@@ -80,10 +80,11 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
 
        /* The problem is when building with 8, 16, or 32 BN_ULONG,
         * unsigned long can be larger */
-       for (i=0; i<sizeof(unsigned long)*8; i++)
+       for (i=0; i<(int)sizeof(unsigned long)*8; i++)
                {
                if (e_value & (1UL<<i))
-                       BN_set_bit(e,i);
+                       if (BN_set_bit(e,i) == 0)
+                               goto err;
                }
 
        BN_GENCB_set_old(&cb, callback, cb_arg);