mirror of
https://github.com/openssl/openssl.git
synced 2024-12-14 12:34:02 +08:00
Avoid the call to OPENSSL_malloc with a negative value (then casted to unsigned)
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2021)
This commit is contained in:
parent
eb43101ff8
commit
210fe4edee
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user