From: Dr. Stephen Henson Date: Fri, 10 Feb 2017 04:22:18 +0000 (+0000) Subject: Check index >= 0 as 0 is a valid index. X-Git-Tag: OpenSSL_1_1_1-pre1~2437 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8fd19b20beca97a2ef804058f099cf54f12f7614;p=oweals%2Fopenssl.git Check index >= 0 as 0 is a valid index. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2587) --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 43340d4d49..d6a841a82f 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1601,7 +1601,7 @@ int tls1_process_sigalgs(SSL *s) if (SSL_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA) continue; idx = tls12_get_pkey_idx(sigptr->sig); - if (idx > 0 && pmd[idx] == NULL) { + if (idx >= 0 && pmd[idx] == NULL) { md = ssl_md(sigptr->hash_idx); pmd[idx] = md; pvalid[idx] = CERT_PKEY_EXPLICIT_SIGN;