提交 d00b1d62 编写于 作者: J Jonas Maebe 提交者: Kurt Roeckx

SSL_COMP_add_compression_method: exit if allocating the new compression method struct fails

Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 02a62d1a
......@@ -1962,6 +1962,13 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
MemCheck_off();
comp=(SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP));
if (comp == NULL)
{
MemCheck_on();
SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE);
return(1);
}
comp->id=id;
comp->method=cm;
load_builtin_compressions();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册