Fix output corruption in req command
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 8 Sep 2023 08:33:24 +0000 (10:33 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 9 Sep 2023 15:04:39 +0000 (17:04 +0200)
commita3e71dc38b757e526c5417ae4274885b1869b7d2
treebbecd0011fac841413e8685e980b46191652efe5
parent0c4f6a445535efa10245810ed0647d14271fb1a7
Fix output corruption in req command

when used in conjunction with -out and -modulus options.

Fixes #21403

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22026)

(cherry picked from commit d2873946dfaff5537ea3d1adf3890e33a3f276ff)
apps/req.c
test/recipes/25-test_req.t