diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-05-26 20:20:52 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-05-26 20:20:52 +0000 |
commit | b6223b745876d320937ce4dea659d07869c8577b (patch) | |
tree | 5add0d0d1d1122aa481f4726142a7f24faaf052b | |
parent | d7586905b9f211f0a1d6a36b00e365eaf9d9789d (diff) |
Unchecked malloc() return value in SSL_COMP_add_compression_method(), in the
!OPENSSL_NO_COMP case. Does not affect OpenBSD as we compile the opposite code
path.
-rw-r--r-- | lib/libssl/ssl_ciph.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c index 6b650ccea3b..b2a1e93688c 100644 --- a/lib/libssl/ssl_ciph.c +++ b/lib/libssl/ssl_ciph.c @@ -1737,6 +1737,10 @@ SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) MemCheck_off(); comp = malloc(sizeof(SSL_COMP)); + if (comp == NULL) { + SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, ERR_R_MALLOC_FAILURE); + return (1); + } comp->id = id; comp->method = cm; load_builtin_compressions(); |