Fix error handling in pipelining test
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 21 Jul 2023 05:34:39 +0000 (07:34 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 24 Jul 2023 09:02:51 +0000 (11:02 +0200)
commitcead7e5adf1eb686f4badfc69511e959230b8638
treef4f409438046b1b06c99071053f910bafd0c67c7
parentdb8e453e6461d8f79946badbd42eec0c505b47c4
Fix error handling in pipelining test

When an early error happens in the test_pipelining
function and idx == 5 the error handling would try
to call OPENSSL_free(msg), but msg is at that time
just a string constant in read-only memory, so a
crash would be the result. Fixed that by using
fragsize as an indication when to free msg.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21512)

(cherry picked from commit 06a0d40322e96dbba816b35f82226871f635ec5a)
test/sslapitest.c