diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 85ea1305d..9420e920b 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -1054,6 +1054,8 @@ dtls1_buffer_message(SSL *s, int is_ccs) 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);