From: Dr. Stephen Henson Date: Tue, 10 Jun 2014 13:47:29 +0000 (+0100) Subject: Fix null pointer errors. X-Git-Tag: OpenSSL_1_0_2-beta2~160 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cea5a1d5f255a6a186cd7944c4a312612da965f3;p=oweals%2Fopenssl.git Fix null pointer errors. PR#3394 (cherry picked from commit 7a9d59c148b773f59a41f8697eeecf369a0974c2) --- diff --git a/crypto/ocsp/ocsp_ht.c b/crypto/ocsp/ocsp_ht.c index a05304748a..bac35f8de1 100644 --- a/crypto/ocsp/ocsp_ht.c +++ b/crypto/ocsp/ocsp_ht.c @@ -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); 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);