Fix bug 75490: memory bug in decodeAndImportKey causes SEGV.
git-svn-id: svn://10.0.0.236/trunk@92112 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user