diff options
author | 2014-05-17 19:58:49 +0000 | |
---|---|---|
committer | 2014-05-17 19:58:49 +0000 | |
commit | c9004369b6a88f5e5c993f2c817c81d2fec9c85f (patch) | |
tree | f8f6daf9b08800a7e3f4f08fee6d25aa1bbc58a2 /lib | |
parent | KNF (diff) | |
download | wireguard-openbsd-c9004369b6a88f5e5c993f2c817c81d2fec9c85f.tar.xz wireguard-openbsd-c9004369b6a88f5e5c993f2c817c81d2fec9c85f.zip |
unchecked malloc() return value in OCSP_sendreq_new().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/ocsp/ocsp_ht.c | 2 | ||||
-rw-r--r-- | lib/libssl/src/crypto/ocsp/ocsp_ht.c | 2 |
2 files changed, 4 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; diff --git a/lib/libssl/src/crypto/ocsp/ocsp_ht.c b/lib/libssl/src/crypto/ocsp/ocsp_ht.c index fe4a7a1a72d..7f73a4195cf 100644 --- a/lib/libssl/src/crypto/ocsp/ocsp_ht.c +++ b/lib/libssl/src/crypto/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; |