diff options
author | nelsonb%netscape.com <devnull@localhost> | 2005-09-22 22:45:32 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2005-09-22 22:45:32 +0000 |
commit | 3a554af072a4e8646ce5960c47d04d9685f674cc (patch) | |
tree | ffd17bdbecd4573b1783cf060e579f1a6d6ee16f /security | |
parent | 5fbf6771f8ed6cd9ae1c08e8cef3a0d351aa905b (diff) | |
download | nss-hg-3a554af072a4e8646ce5960c47d04d9685f674cc.tar.gz |
Don't crash when printing an ASN.1 NULL primitive with a NULL prefix
string. Bug 309651. r=wtchang.
Diffstat (limited to 'security')
-rw-r--r-- | security/nss/cmd/lib/secutil.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/security/nss/cmd/lib/secutil.c b/security/nss/cmd/lib/secutil.c index 7de3f1a0b..1f41e938d 100644 --- a/security/nss/cmd/lib/secutil.c +++ b/security/nss/cmd/lib/secutil.c @@ -1318,7 +1318,11 @@ secu_PrintUniversal(FILE *out, SECItem *i, char *m, int level) SECU_PrintUTCTime(out, i, m, level); break; case SEC_ASN1_NULL: - SECU_Indent(out, level); fprintf(out, "%s: NULL\n", m); + SECU_Indent(out, level); + if (m && m[0]) + fprintf(out, "%s: NULL\n", m); + else + fprintf(out, "NULL\n"); break; case SEC_ASN1_SET: case SEC_ASN1_SEQUENCE: |