diff options
Diffstat (limited to 'deps/openssl/openssl/crypto/cms/cms_enc.c')
-rw-r--r-- | deps/openssl/openssl/crypto/cms/cms_enc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/openssl/openssl/crypto/cms/cms_enc.c b/deps/openssl/openssl/crypto/cms/cms_enc.c index ed913426bc..a1719830e8 100644 --- a/deps/openssl/openssl/crypto/cms/cms_enc.c +++ b/deps/openssl/openssl/crypto/cms/cms_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -168,9 +168,10 @@ int cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec, { ec->cipher = cipher; if (key) { - ec->key = OPENSSL_malloc(keylen); - if (ec->key == NULL) + if ((ec->key = OPENSSL_malloc(keylen)) == NULL) { + CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT, ERR_R_MALLOC_FAILURE); return 0; + } memcpy(ec->key, key, keylen); } ec->keylen = keylen; |