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 <jiashengjiangcool@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27896)
/* 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");