Index: nss/lib/freebl/rsa.c |
diff --git a/nss/lib/freebl/rsa.c b/nss/lib/freebl/rsa.c |
index f1824eff9ad51e19817493ea6fab04c7319cb8a5..48b557b42178cadd7a5694c1e35610244115c86e 100644 |
--- a/nss/lib/freebl/rsa.c |
+++ b/nss/lib/freebl/rsa.c |
@@ -747,8 +747,7 @@ RSA_PopulatePrivateKey(RSAPrivateKey *key) |
} |
/* if we have the modulus and one prime, calculate the second. */ |
if ((prime_count == 1) && (hasModulus)) { |
- mp_div(&n,&p,&q,&r); |
- if (mp_cmp_z(&r) != 0) { |
+ if (mp_div(&n,&p,&q,&r) != MP_OKAY || mp_cmp_z(&r) != 0) { |
/* p is not a factor or n, fail */ |
err = MP_BADARG; |
goto cleanup; |
@@ -1096,9 +1095,7 @@ init_blinding_params(RSABlindingParams *rsabp, RSAPrivateKey *key, |
rsabp->free = bp; |
/* List elements are keyed using the modulus */ |
- SECITEM_CopyItem(NULL, &rsabp->modulus, &key->modulus); |
- |
- return SECSuccess; |
+ return SECITEM_CopyItem(NULL, &rsabp->modulus, &key->modulus); |
} |
static SECStatus |