diff options
author | wtc%netscape.com <devnull@localhost> | 2002-09-26 00:04:25 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-09-26 00:04:25 +0000 |
commit | fe264807583e44f30c5d62d18d86d83a19d6bd2d (patch) | |
tree | de82d73491d645b655928cf974b02d1263d248d5 /security | |
parent | 40cbadf0a9beb910033dd51ddd1becd61df35a06 (diff) | |
download | nss-hg-fe264807583e44f30c5d62d18d86d83a19d6bd2d.tar.gz |
Bug 170379: fix the stack overflow crash by not allocating the 32K "sieve"
array on the stack.
Diffstat (limited to 'security')
-rw-r--r-- | security/nss/lib/freebl/mpi/mpprime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/nss/lib/freebl/mpi/mpprime.c b/security/nss/lib/freebl/mpi/mpprime.c index dc0e77732..636dbb188 100644 --- a/security/nss/lib/freebl/mpi/mpprime.c +++ b/security/nss/lib/freebl/mpi/mpprime.c @@ -428,7 +428,8 @@ mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong, * Mac builds don't break by adding an extra variable * on the stack. -javi */ -#if defined(macintosh) || defined (XP_OS2) +#if defined(macintosh) || defined (XP_OS2) \ + || (defined(HPUX) && defined(__ia64)) unsigned char *sieve; sieve = malloc(SIEVE_SIZE); @@ -570,7 +571,8 @@ CLEANUP: mp_clear(&q); if (nTries) *nTries += i; -#if defined(macintosh) || defined(XP_OS2) +#if defined(macintosh) || defined(XP_OS2) \ + || (defined(HPUX) && defined(__ia64)) if (sieve != NULL) { memset(sieve, 0, SIEVE_SIZE); free (sieve); |