diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-08-11 07:17:17 +0200 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-08-24 03:19:28 +0200 |
commit | 90e0e0d8023fca71b019232ffc5804b8d07e2ff2 (patch) | |
tree | 00703537a5b9641f4467c6a16058347edb180ee6 /crypto/encode_decode | |
parent | Fix coverity CID #1465594 - Null dereference in EVP_PKEY_get0() (diff) | |
download | openssl-90e0e0d8023fca71b019232ffc5804b8d07e2ff2.tar.xz openssl-90e0e0d8023fca71b019232ffc5804b8d07e2ff2.zip |
Fix coverity CID #1465797 - Negative loop bound in collect_deserializer
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12628)
Diffstat (limited to 'crypto/encode_decode')
-rw-r--r-- | crypto/encode_decode/decoder_pkey.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/encode_decode/decoder_pkey.c b/crypto/encode_decode/decoder_pkey.c index 7f468c2476..e04b94de86 100644 --- a/crypto/encode_decode/decoder_pkey.c +++ b/crypto/encode_decode/decoder_pkey.c @@ -289,6 +289,8 @@ static void collect_decoder(OSSL_DECODER *decoder, void *arg) return; data->error_occured = 1; /* Assume the worst */ + if (data->names == NULL) + return; end_i = sk_OPENSSL_CSTRING_num(data->names); for (i = 0; i < end_i; i++) { |