projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb43101
)
Avoid the call to OPENSSL_malloc with a negative value (then casted to unsigned)
author
Davide Galassi
<davide.galassi@gmail.com>
Fri, 2 Dec 2016 16:10:37 +0000
(17:10 +0100)
committer
Rich Salz
<rsalz@openssl.org>
Sat, 10 Dec 2016 21:41:59 +0000
(16:41 -0500)
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)
crypto/dso/dso_lib.c
patch
|
blob
|
history
diff --git
a/crypto/dso/dso_lib.c
b/crypto/dso/dso_lib.c
index 8f185b38283cdd870c3a8b9374175712ba3c95db..ec3c59ac4d222293dbd0cf5412c1e81f2bf85e28 100644
(file)
--- a/
crypto/dso/dso_lib.c
+++ b/
crypto/dso/dso_lib.c
@@
-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)