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:36:56 -0400
commit48b571fe771f283d547ca2a5999ce5dd9a5509d0 (patch)
treee7cac67329034896357fa31e3ccfb3b92fd8a44d /crypto/cms
parente85bef981c037a6ebc0ca39f61c11bd79ed89fb3 (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)
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 6d43516489..2123875f1c 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)