From: Dr. Stephen Henson Date: Thu, 12 Mar 2009 17:30:29 +0000 (+0000) Subject: Submitted by: Victor Duchovni X-Git-Tag: OpenSSL_0_9_8k^2~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=78625cac82821f5eec0728a4abc1452dc779b787;p=oweals%2Fopenssl.git Submitted by: Victor Duchovni Reviewed by: steve@openssl.org Check return value of sk_SSL_COMP_find() properly. --- diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 4826df8002..080b00a501 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1715,7 +1715,7 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) comp->method=cm; load_builtin_compressions(); if (ssl_comp_methods - && !sk_SSL_COMP_find(ssl_comp_methods,comp)) + && sk_SSL_COMP_find(ssl_comp_methods,comp) >= 0) { OPENSSL_free(comp); MemCheck_on();