diff options
author | neil.williams%sun.com <devnull@localhost> | 2005-11-16 00:59:18 +0000 |
---|---|---|
committer | neil.williams%sun.com <devnull@localhost> | 2005-11-16 00:59:18 +0000 |
commit | 44f82b17bbfad4021213b74186fffeeb30082816 (patch) | |
tree | 0063a444bca65939f8314d0fb686ade197c4e88a | |
parent | c9a0a9fc84a64a6d97e3f483b6d908324e0b84c1 (diff) | |
download | nss-hg-44f82b17bbfad4021213b74186fffeeb30082816.tar.gz |
Bug 315135, pk12util -w <non-existent pwfile> causes seg fault.
r=nelson
-rw-r--r-- | security/nss/cmd/pk12util/pk12util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/nss/cmd/pk12util/pk12util.c b/security/nss/cmd/pk12util/pk12util.c index 69fa49e82..1d15f1663 100644 --- a/security/nss/cmd/pk12util/pk12util.c +++ b/security/nss/cmd/pk12util/pk12util.c @@ -301,6 +301,9 @@ P12U_GetP12FilePassword(PRBool confirmPw, secuPWData *p12FilePw) p0 = p12FilePw->data; } + if (p0 == NULL) { + return NULL; + } pwItem = SECITEM_AllocItem(NULL, NULL, PL_strlen(p0) + 1); memcpy(pwItem->data, p0, pwItem->len); |