summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-11-04 15:51:02 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:54:19 +0000
commit903738ac63e60c10552741e2d6de9753c67e0ff3 (patch)
treee2e8b182c351cb41aa65e0cda6d15384223a1f94 /crypto/pkcs7
parenta89dda8cd024f53cbae75655e9ec000d9b4a320b (diff)
Fix missing malloc return value checks
During work on a larger change in master a number of locations were identified where return value checks were missing. This backports the relevant fixes. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r--crypto/pkcs7/pk7_doit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c
index 83f3b77b29..946aaa6543 100644
--- a/crypto/pkcs7/pk7_doit.c
+++ b/crypto/pkcs7/pk7_doit.c
@@ -656,6 +656,8 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
bio = BIO_new_mem_buf(data_body->data, data_body->length);
else {
bio = BIO_new(BIO_s_mem());
+ if (bio == NULL)
+ goto err;
BIO_set_mem_eof_return(bio, 0);
}
if (bio == NULL)