Fix null pointer errors.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 10 Jun 2014 13:47:29 +0000 (14:47 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 10 Jun 2014 13:48:02 +0000 (14:48 +0100)
PR#3394
(cherry picked from commit 7a9d59c148b773f59a41f8697eeecf369a0974c2)

crypto/ocsp/ocsp_ht.c
ssl/d1_both.c

index a05304748a3d1dd26d796ae19e81ee62a83cd66f..bac35f8de156eea5a2e24fc2edf082c9b36c9cee 100644 (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);
index 228af21462c1812cbe84ed023a5caa181e3dd46a..51d484d7eaad599870b9146c5e17cdd1a5053821 100644 (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);