From 9f49524331938282722d81d887a9dcb11e711b82 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 4 Dec 2000 17:17:03 +0000 Subject: [PATCH] It's completely unnecessary to add a compression algorithm that is really undefined. Spotted by Jeffrey Altman --- ssl/ssl_ciph.c | 3 +++ 1 file changed, 3 insertions(+) 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;