From: Richard Levitte Date: Mon, 4 Dec 2000 17:17:03 +0000 (+0000) Subject: It's completely unnecessary to add a compression algorithm that is X-Git-Tag: OpenSSL_0_9_6a-beta1~107^2~44 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=9f49524331938282722d81d887a9dcb11e711b82 It's completely unnecessary to add a compression algorithm that is really undefined. Spotted by Jeffrey Altman --- diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index e01bb34d0c..a196d5e574 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1081,6 +1081,9 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) SSL_COMP *comp; STACK_OF(SSL_COMP) *sk; + if (cm == NULL || cm->type == NID_undef) + return 1; + MemCheck_off(); comp=(SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP)); comp->id=id;