Fix null pointer errors.

PR#3394
This commit is contained in:
Dr. Stephen Henson 2014-06-10 14:47:29 +01:00
parent 447280ca7b
commit 7a9d59c148
2 changed files with 5 additions and 0 deletions

View File

@ -571,6 +571,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req)
ctx = OCSP_sendreq_new(b, path, req, -1);
if (!ctx)
return NULL;
do
{
rv = OCSP_sendreq_nbio(&resp, ctx);

View File

@ -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);