summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-29 00:07:04 +0800
committerTodd Short <todd.short@me.com>2022-06-02 10:54:17 -0400
commit5bc6a962fd8651afbe50600141b14067866dd8b3 (patch)
tree995da80be6232cdd455e78167fa2aae4e46a66ec /crypto/cms
parent6e598087f3eb91d147346ce50bc8ea3839d8efac (diff)
Fix the checks of BIO_get_cipher_status
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18424) (cherry picked from commit 48b571fe771f283d547ca2a5999ce5dd9a5509d0)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_smime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c
index 4e80a13b4d..f1517c4647 100644
--- a/crypto/cms/cms_smime.c
+++ b/crypto/cms/cms_smime.c
@@ -48,7 +48,7 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)
i = BIO_read(in, buf, sizeof(buf));
if (i <= 0) {
if (BIO_method_type(in) == BIO_TYPE_CIPHER) {
- if (!BIO_get_cipher_status(in))
+ if (BIO_get_cipher_status(in) <= 0)
goto err;
}
if (i < 0)