summaryrefslogtreecommitdiffstats
path: root/crypto/encode_decode
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-08-11 07:17:17 +0200
committerShane Lontis <shane.lontis@oracle.com>2020-08-24 03:19:28 +0200
commit90e0e0d8023fca71b019232ffc5804b8d07e2ff2 (patch)
tree00703537a5b9641f4467c6a16058347edb180ee6 /crypto/encode_decode
parentFix coverity CID #1465594 - Null dereference in EVP_PKEY_get0() (diff)
downloadopenssl-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.c2
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++) {