summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ocsp
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-17 19:58:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-17 19:58:50 +0000
commit56867e9ba8c2a71571f6f8caae847a17a353966e (patch)
tree6f23ad7702ac671b718b33cfc376d86b10e267d7 /lib/libcrypto/ocsp
parent8c8c082a8c7f80bac3f2c4613213f05bf43a2459 (diff)
unchecked malloc() return value in OCSP_sendreq_new().
Diffstat (limited to 'lib/libcrypto/ocsp')
-rw-r--r--lib/libcrypto/ocsp/ocsp_ht.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libcrypto/ocsp/ocsp_ht.c b/lib/libcrypto/ocsp/ocsp_ht.c
index fe4a7a1a72d..7f73a4195cf 100644
--- a/lib/libcrypto/ocsp/ocsp_ht.c
+++ b/lib/libcrypto/ocsp/ocsp_ht.c
@@ -160,6 +160,8 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
OCSP_REQ_CTX *rctx;
rctx = malloc(sizeof(OCSP_REQ_CTX));
+ if (rctx == NULL)
+ return 0;
rctx->state = OHS_ERROR;
rctx->mem = BIO_new(BIO_s_mem());
rctx->io = io;