Fix SMIME_crlf_copy() to properly report an error
authorMatt Caswell <matt@openssl.org>
Tue, 6 Dec 2022 14:21:23 +0000 (14:21 +0000)
committerTomas Mraz <tomas@openssl.org>
Thu, 22 Dec 2022 10:01:06 +0000 (11:01 +0100)
commit9e5bd8923bff3e4f0cbba05c7dadfe289c66eb6f
tree9f55339816176ebee7923c449a9f634e019bde06
parente51dd6ee1bac6b54debea3f48c6f58b761229b73
Fix SMIME_crlf_copy() to properly report an error

If the BIO unexpectedly fails to flush then SMIME_crlf_copy() was not
correctly reporting the error. We modify it to properly propagate the
error condition.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19918)
crypto/asn1/asn_mime.c
test/bio_memleak_test.c