summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorDaniel Fiala <daniel@openssl.org>2022-09-21 15:29:51 +0200
committerTomas Mraz <tomas@openssl.org>2022-09-23 11:14:12 +0200
commit678b489a2ae8af289cef939a538235686b448c0e (patch)
tree572d64634f7aa85fc606904e0c6bc19f9a2f72fe /crypto/cms
parent78c44b05945be07eae86f0164b9b777e2de2295b (diff)
Clear incorrectly reported errors in d2i_CMS_ContentInfo
Fixes openssl#19003 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19255)
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c
index a2de6db5f2..e39fde9e43 100644
--- a/crypto/cms/cms_lib.c
+++ b/crypto/cms/cms_lib.c
@@ -33,8 +33,11 @@ CMS_ContentInfo *d2i_CMS_ContentInfo(CMS_ContentInfo **a,
(CMS_ContentInfo_it()),
ossl_cms_ctx_get0_libctx(ctx),
ossl_cms_ctx_get0_propq(ctx));
- if (ci != NULL)
+ if (ci != NULL) {
+ ERR_set_mark();
ossl_cms_resolve_libctx(ci);
+ ERR_pop_to_mark();
+ }
return ci;
}