diff options
author | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-06-27 11:51:47 -0700 |
---|---|---|
committer | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-06-27 11:51:47 -0700 |
commit | 5547c08ead42d757c383dcc8f55537cf571433ee (patch) | |
tree | 5b8e99f3b1c98c14356b8e6b9064cde27d1e5e2e /lib/certdb | |
parent | 6dd7e06125b1f10ac13bee7aa609774d491e5f00 (diff) | |
download | nss-hg-5547c08ead42d757c383dcc8f55537cf571433ee.tar.gz |
Bug 1376520 - some static analysis (infer) fixes, r=ttaubert
Differential Revision: https://nss-review.dev.mozaws.net/D354
Diffstat (limited to 'lib/certdb')
-rw-r--r-- | lib/certdb/certv3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/certdb/certv3.c b/lib/certdb/certv3.c index bf0bcf96c..d27fc1ba0 100644 --- a/lib/certdb/certv3.c +++ b/lib/certdb/certv3.c @@ -213,7 +213,7 @@ CERT_CheckCertUsage(CERTCertificate *cert, unsigned char usage) if (rv == SECFailure) { rv = (PORT_GetError() == SEC_ERROR_EXTENSION_NOT_FOUND) ? SECSuccess : SECFailure; - } else if (!(keyUsage.data[0] & usage)) { + } else if (!keyUsage.data || !(keyUsage.data[0] & usage)) { PORT_SetError(SEC_ERROR_CERT_USAGES_INVALID); rv = SECFailure; } |