It's completely unnecessary to add a compression algorithm that is
authorRichard Levitte <levitte@openssl.org>
Mon, 4 Dec 2000 17:17:03 +0000 (17:17 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 4 Dec 2000 17:17:03 +0000 (17:17 +0000)
really undefined.
Spotted by Jeffrey Altman <jaltman@columbia.edu>

ssl/ssl_ciph.c

index e01bb34d0c77541390e5cf4a2b15d5a462942650..a196d5e574eb15a4d2c3f47835a2829890ad9796 100644 (file)
@@ -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;