From b5b833a9c0aab9721b487e83b1cabec0ec7dc3e1 Mon Sep 17 00:00:00 2001 From: "wtchang%redhat.com" Date: Mon, 1 Aug 2005 22:43:54 +0000 Subject: [PATCH] Bugzilla Bug 302262: Check for SECITEM_AllocItem failure in MPINT_TO_SECITEM. r=nelsonb. --- security/nss/lib/freebl/secmpi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/security/nss/lib/freebl/secmpi.h b/security/nss/lib/freebl/secmpi.h index 6b7a926b7853..e343fb8943ae 100644 --- a/security/nss/lib/freebl/secmpi.h +++ b/security/nss/lib/freebl/secmpi.h @@ -48,6 +48,7 @@ #define MPINT_TO_SECITEM(mp, it, arena) \ SECITEM_AllocItem(arena, (it), mp_unsigned_octet_size(mp)); \ + if ((it)->data == NULL) {err = MP_MEM; goto cleanup;} \ err = mp_to_unsigned_octets(mp, (it)->data, (it)->len); \ if (err < 0) goto cleanup; else err = MP_OKAY;