From df555d9fd30955a93fa24200efebc0809136574a Mon Sep 17 00:00:00 2001 From: "alexei.volkov.bugs%sun.com" Date: Sat, 13 May 2006 00:33:14 +0000 Subject: [PATCH] Patch contributed by timeless@bemail.org [Bug 336466] oom crash [@ CERT_DecodeAuthKeyID]. r=nelson git-svn-id: svn://10.0.0.236/trunk@196444 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/certdb/xauthkid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/security/nss/lib/certdb/xauthkid.c b/mozilla/security/nss/lib/certdb/xauthkid.c index 8d9df21237e..8fb5a01220e 100644 --- a/mozilla/security/nss/lib/certdb/xauthkid.c +++ b/mozilla/security/nss/lib/certdb/xauthkid.c @@ -119,10 +119,10 @@ CERT_DecodeAuthKeyID (PRArenaPool *arena, SECItem *encodedValue) do { mark = PORT_ArenaMark (arena); - value = (CERTAuthKeyID*)PORT_ArenaZAlloc (arena, sizeof (*value)); - value->DERAuthCertIssuer = NULL; + value = (CERTAuthKeyID*)PORT_ArenaZAlloc (arena, sizeof (*value)); if (value == NULL) break; + value->DERAuthCertIssuer = NULL; /* copy the DER into the arena, since Quick DER returns data that points into the DER input, which may get freed by the caller */ rv = SECITEM_CopyItem(arena, &newEncodedValue, encodedValue);