From 482d26522209133d675615f6eb1f35a918390861 Mon Sep 17 00:00:00 2001 From: "nicolson%netscape.com" Date: Thu, 12 Apr 2001 22:13:25 +0000 Subject: [PATCH] Fix bug 75490: memory bug in decodeAndImportKey causes SEGV. git-svn-id: svn://10.0.0.236/trunk@92112 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Store.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Store.c b/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Store.c index db847eda537..ed6f64a1efe 100644 --- a/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Store.c +++ b/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Store.c @@ -807,15 +807,13 @@ decodeAndImportKey(SECItem *dervalue, return OUT_OF_MEM; } - pki = (SECKEYPrivateKeyInfo *) - PORT_ArenaZAlloc(temparena, sizeof(SECKEYPrivateKeyInfo)); + pki = PR_NEWZAP(SECKEYPrivateKeyInfo); if(pki == NULL) { result = DECODE_FAILURE; goto loser; } - pk = (SECKEYLowPrivateKey *) - PORT_ArenaZAlloc(temparena, sizeof(SECKEYLowPrivateKey)); + pk = PR_NEWZAP(SECKEYLowPrivateKey); if(pk == NULL) { result = DECODE_FAILURE; goto loser;