From: Jiasheng Jiang Date: Fri, 27 Jun 2025 15:59:13 +0000 (+0000) Subject: demos/cms/cms_ddec.c: Replace "in" with "dcont" to correctly check the success of... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ccc4146d459ddfd54f77835302c1a7a20d0cfb;p=thirdparty%2Fopenssl.git demos/cms/cms_ddec.c: Replace "in" with "dcont" to correctly check the success of BIO_new_file() Replace "in" with "dcont" to properly check the return value of BIO_new_file(). Fixes: 1728756 ("Detached encrypt/decrypt example, fix decrypt sample.") Signed-off-by: Jiasheng Jiang Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27896) (cherry picked from commit 8a7545607e872ccaff3018e2cd201cce65e615ec) --- diff --git a/demos/cms/cms_ddec.c b/demos/cms/cms_ddec.c index d119e972222..1958dcd623a 100644 --- a/demos/cms/cms_ddec.c +++ b/demos/cms/cms_ddec.c @@ -58,7 +58,7 @@ int main(int argc, char **argv) /* Open file containing detached content */ dcont = BIO_new_file("smencr.out", "rb"); - if (!in) + if (dcont == NULL) goto err; out = BIO_new_file("encrout.txt", "w");