summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-12-04 17:17:03 +0000
committerRichard Levitte <levitte@openssl.org>2000-12-04 17:17:03 +0000
commit9f49524331938282722d81d887a9dcb11e711b82 (patch)
treea793c502ce5d03a99e33035ae746a9d0d7cfe1c4 /ssl
parent6a2347ee45927c595847e797778af2031cba8e0d (diff)
It's completely unnecessary to add a compression algorithm that is
really undefined. Spotted by Jeffrey Altman <jaltman@columbia.edu>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_ciph.c3
1 files changed, 3 insertions, 0 deletions
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;