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:
ed3eb5e
)
Check for failed malloc in BIO_ADDR_new
author
Matt Caswell
<matt@openssl.org>
Fri, 29 Apr 2016 10:27:09 +0000
(11:27 +0100)
committer
Matt Caswell
<matt@openssl.org>
Fri, 29 Apr 2016 15:47:41 +0000
(16:47 +0100)
BIO_ADDR_new() calls OPENSSL_zalloc() which can fail - but the return
value is not checked.
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/bio/b_addr.c
patch
|
blob
|
history
diff --git
a/crypto/bio/b_addr.c
b/crypto/bio/b_addr.c
index bfc745b76960405128c43f18da512309e48fcb27..86c6c7eca883fb25a857aa089a6cfc938e05c699 100644
(file)
--- a/
crypto/bio/b_addr.c
+++ b/
crypto/bio/b_addr.c
@@
-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;
}