summaryrefslogtreecommitdiffstats
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:07 +0100
commitaa59369b4ca279d9896d45085e229d9803ad45eb (patch)
tree15db7bafe8c5bc012f31f74b0b9664827908811b
parent18c7f2fce8a82b13506cac7ca69fc333baf76408 (diff)
Fix null pointer errors.
PR#3394 (cherry picked from commit 7a9d59c148b773f59a41f8697eeecf369a0974c2)
-rw-r--r--crypto/ocsp/ocsp_ht.c3
-rw-r--r--ssl/d1_both.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_ht.c b/crypto/ocsp/ocsp_ht.c
index af5fc16691..b4126ade51 100644
--- a/crypto/ocsp/ocsp_ht.c
+++ b/crypto/ocsp/ocsp_ht.c
@@ -490,6 +490,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, 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 04aa23107e..c1eb970a86 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -1180,6 +1180,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);