diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 23:29:43 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-04 23:48:44 +0100 |
commit | 241e2dc9362b8d36847c0df00c24e0199234c7c6 (patch) | |
tree | c7a6fd78097a4b1cc45c7f425d99359eeb3779c3 /ssl/d1_both.c | |
parent | d15f5df70d890f9bd71a4d665699cb96f441f741 (diff) |
dtls1_heartbeat: check for NULL after allocating s->cert->ctypes
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 41ef5cb4f8..877a2bfbc6 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -1481,6 +1481,11 @@ dtls1_heartbeat(SSL *s) * - Padding */ buf = OPENSSL_malloc(1 + 2 + payload + padding); + if (buf == NULL) + { + SSLerr(SSL_F_DTLS1_HEARTBEAT, ERR_R_MALLOC_FAILURE); + return -1; + } p = buf; /* Message Type */ *p++ = TLS1_HB_REQUEST; |