diff options
author | saul.edwards%sun.com <devnull@localhost> | 2005-08-24 17:56:32 +0000 |
---|---|---|
committer | saul.edwards%sun.com <devnull@localhost> | 2005-08-24 17:56:32 +0000 |
commit | 2d95bf669a8ea7689b4f1d9e2ef7f009cee4bede (patch) | |
tree | 81f6fb760d4ccb2af497ff8e4796b7a8e22fb7ba | |
parent | a4aee94039182eba282cc0a74ad3956a659e4767 (diff) | |
download | nss-hg-2d95bf669a8ea7689b4f1d9e2ef7f009cee4bede.tar.gz |
Fix leak in mp_mul/mp_sqr. This was already done on the trunk.
-rw-r--r-- | security/nss/lib/freebl/mpi/mpi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/security/nss/lib/freebl/mpi/mpi.c b/security/nss/lib/freebl/mpi/mpi.c index 6d0769654..1b19a84c7 100644 --- a/security/nss/lib/freebl/mpi/mpi.c +++ b/security/nss/lib/freebl/mpi/mpi.c @@ -848,19 +848,19 @@ mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int * c) if ((a->used == b->used) && isPowerof2(b->used)) { if (a->used == 4) { mp_mul_comba_4(a, b, c); - return MP_OKAY; + goto CLEANUP; } if (a->used == 8) { mp_mul_comba_8(a, b, c); - return MP_OKAY; + goto CLEANUP; } if (a->used == 16) { mp_mul_comba_16(a, b, c); - return MP_OKAY; + goto CLEANUP; } if (a->used == 32) { mp_mul_comba_32(a, b, c); - return MP_OKAY; + goto CLEANUP; } } #endif @@ -936,22 +936,22 @@ mp_err mp_sqr(const mp_int *a, mp_int *sqr) MP_DIGIT(sqr, 0) = 0; #ifdef NSS_USE_COMBA - if ((a->used <= 16) && isPowerof2(a->used)) { + if (isPowerof2(a->used)) { if (a->used == 4) { mp_sqr_comba_4(a, sqr); - return MP_OKAY; + goto CLEANUP; } if (a->used == 8) { mp_sqr_comba_8(a, sqr); - return MP_OKAY; + goto CLEANUP; } if (a->used == 16) { mp_sqr_comba_16(a, sqr); - return MP_OKAY; + goto CLEANUP; } if (a->used == 32) { mp_sqr_comba_32(a, sqr); - return MP_OKAY; + goto CLEANUP; } } #endif |