diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-04-30 19:30:45 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-04-30 19:30:45 +0000 |
commit | 86c32d499e2f9db08973fb2c98c2fbbbe9d3c9cb (patch) | |
tree | 9907f6022d3ce7b8731298e61b4585964bfe9821 | |
parent | e57192864fa57237aea4aa1bf3e3eb7e3b148f4b (diff) | |
download | nss-hg-86c32d499e2f9db08973fb2c98c2fbbbe9d3c9cb.tar.gz |
bug 140474, fix possible unwarranted assertion
-rw-r--r-- | security/nss/lib/pk11wrap/pk11cert.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index c5436eb52..98c6e6fd3 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -1567,8 +1567,10 @@ PK11_FindCertsFromNickname(char *nickname, void *wincx) { } if (nameList) { count = nssList_Count(nameList); - foundCerts = nss_ZNEWARRAY(NULL, NSSCertificate *, count + 1); - nssList_GetArray(nameList, (void **)foundCerts, count); + if (count > 0) { + foundCerts = nss_ZNEWARRAY(NULL, NSSCertificate *, count + 1); + nssList_GetArray(nameList, (void **)foundCerts, count); + } nssList_Destroy(nameList); } } |