From 78625cac82821f5eec0728a4abc1452dc779b787 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 12 Mar 2009 17:30:29 +0000 Subject: [PATCH] Submitted by: Victor Duchovni Reviewed by: steve@openssl.org Check return value of sk_SSL_COMP_find() properly. --- ssl/ssl_ciph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.25.1