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:
c27dc39
)
tls1_heartbeat: check for NULL after allocating buf
author
Jonas Maebe
<jonas.maebe@elis.ugent.be>
Mon, 9 Dec 2013 16:21:43 +0000
(17:21 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Wed, 10 Dec 2014 17:35:18 +0000
(18:35 +0100)
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/t1_lib.c
patch
|
blob
|
history
diff --git
a/ssl/t1_lib.c
b/ssl/t1_lib.c
index 4133c43ff2b5ec59a1a56687527fe110e6cefa34..8d5fd12903c2b83c151c88f2ad88e105742bcf41 100644
(file)
--- a/
ssl/t1_lib.c
+++ b/
ssl/t1_lib.c
@@
-4094,6
+4094,11
@@
tls1_heartbeat(SSL *s)
* - Padding
*/
buf = OPENSSL_malloc(1 + 2 + payload + padding);
+ if (buf == NULL)
+ {
+ SSLerr(SSL_F_TLS1_HEARTBEAT,ERR_R_MALLOC_FAILURE);
+ return -1;
+ }
p = buf;
/* Message Type */
*p++ = TLS1_HB_REQUEST;