diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 23:29:17 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-04 23:48:44 +0100 |
commit | d15f5df70d890f9bd71a4d665699cb96f441f741 (patch) | |
tree | f34edee1f6498cf24f8a83eeb76002382b3adfe2 /ssl | |
parent | b1a08ac71f87ff5fb14a115879e6bcc74f85f08f (diff) |
dtls1_process_heartbeat: check for NULL after allocating buffer
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/d1_both.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 82e814ae6f..41ef5cb4f8 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -1392,6 +1392,8 @@ dtls1_process_heartbeat(SSL *s) * payload, plus padding */ buffer = OPENSSL_malloc(write_length); + if (buffer == NULL) + return -1; bp = buffer; /* Enter response type, length and copy payload */ |