Submitted by: Victor Duchovni <Victor.Duchovni@morganstanley.com>

Reviewed by: steve@openssl.org

Check return value of sk_SSL_COMP_find() properly.
This commit is contained in:
Dr. Stephen Henson 2009-03-12 17:30:29 +00:00
parent c28a9165f2
commit 78625cac82

View file

@ -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();