nss/0001-libnsspem-rhbz-734760.patch
Elio Maldonado 3586aff4e7 - Fix attempt to free initialized pointer (#717338)
- Fix leak on pem_CreateObject when given non-existing file name (#734760)
- Fix pem_Initialize to return CKR_CANT_LOCK on multi-treaded calls (#736410)
2011-09-14 12:28:24 -07:00

22 lines
969 B
Diff

diff -up ./mozilla/security/nss/lib/ckfw/pem/pobject.c.734760 ./mozilla/security/nss/lib/ckfw/pem/pobject.c
--- ./mozilla/security/nss/lib/ckfw/pem/pobject.c.734760 2011-09-10 10:21:38.819248564 -0700
+++ ./mozilla/security/nss/lib/ckfw/pem/pobject.c 2011-09-10 10:28:47.970083785 -0700
@@ -1117,7 +1117,7 @@ pem_CreateObject
nobjs = ReadDERFromFile(&derlist, filename, PR_TRUE, &cipher, &ivstring, PR_TRUE /* certs only */);
if (nobjs < 1)
- return (NSSCKMDObject *) NULL;
+ goto loser;
objid = -1;
/* Brute force: find the id of the key, if any, in this slot */
@@ -1176,7 +1176,7 @@ pem_CreateObject
nobjs = ReadDERFromFile(&derlist, filename, PR_TRUE, &cipher, &ivstring, PR_FALSE /* keys only */);
if (nobjs < 1)
- return (NSSCKMDObject *) NULL;
+ goto loser;
certDER.len = 0; /* in case there is no equivalent cert */
certDER.data = NULL;