diff options
author | J.C. Jones <jjones@mozilla.com> | 2019-08-13 17:32:31 +0000 |
---|---|---|
committer | J.C. Jones <jjones@mozilla.com> | 2019-08-13 17:32:31 +0000 |
commit | cdde28f54054769fe24030a0cf2fc30c72d9727a (patch) | |
tree | a2deb19b445cdce53874dcb508edd6b29c1011ed /lib | |
parent | 82f253fffef9dd910a08d0a05ddb790b65e67b15 (diff) | |
download | nss-hg-cdde28f54054769fe24030a0cf2fc30c72d9727a.tar.gz |
Bug 1572791 - Check for nulls in SSLExp_DelegateCredential and its tests r=kjacobs
This particularly catches test errors in tls_subcerts_unittest when the profile
is stale.
Differential Revision: https://phabricator.services.mozilla.com/D41429
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl/tls13subcerts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ssl/tls13subcerts.c b/lib/ssl/tls13subcerts.c index 43d31b516..90e04d568 100644 --- a/lib/ssl/tls13subcerts.c +++ b/lib/ssl/tls13subcerts.c @@ -665,6 +665,11 @@ SSLExp_DelegateCredential(const CERTCertificate *cert, sslDelegatedCredential *dc = NULL; sslBuffer dcBuf = SSL_BUFFER_EMPTY; + if (!cert || !certPriv || !dcPub || !out) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + dc = PORT_ZNew(sslDelegatedCredential); if (!dc) { PORT_SetError(SEC_ERROR_NO_MEMORY); |