提交 138388fe 编写于 作者: M Matt Caswell

Check for failed malloc in BIO_ADDR_new

BIO_ADDR_new() calls OPENSSL_zalloc() which can fail - but the return
value is not checked.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 ed3eb5e0
......@@ -83,6 +83,9 @@ BIO_ADDR *BIO_ADDR_new(void)
{
BIO_ADDR *ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL)
return NULL;
ret->sa.sa_family = AF_UNSPEC;
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册