提交 210fe4ed 编写于 作者: D Davide Galassi 提交者: Rich Salz

Avoid the call to OPENSSL_malloc with a negative value (then casted to unsigned)

CLA: trivial
Reviewed-by: NMatt Caswell <matt@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2021)
上级 eb43101f
......@@ -324,6 +324,9 @@ DSO *DSO_dsobyaddr(void *addr, int flags)
char *filename = NULL;
int len = DSO_pathbyaddr(addr, NULL, 0);
if (len < 0)
return NULL;
filename = OPENSSL_malloc(len);
if (filename != NULL
&& DSO_pathbyaddr(addr, filename, len) == len)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册