summaryrefslogtreecommitdiffstats
path: root/ssl/d1_both.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-06-10 14:47:29 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-06-10 14:48:02 +0100
commitcea5a1d5f255a6a186cd7944c4a312612da965f3 (patch)
tree6ff33dd1842807d36a53a7065a26cc22bdb4d6b9 /ssl/d1_both.c
parentf472ada00681d0de7c68d13ecbd404d822afa8b1 (diff)
Fix null pointer errors.
PR#3394 (cherry picked from commit 7a9d59c148b773f59a41f8697eeecf369a0974c2)
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 228af21462..51d484d7ea 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -1051,6 +1051,8 @@ dtls1_buffer_message(SSL *s, int is_ccs)
OPENSSL_assert(s->init_off == 0);
frag = dtls1_hm_fragment_new(s->init_num, 0);
+ if (!frag)
+ return 0;
memcpy(frag->fragment, s->init_buf->data, s->init_num);