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:03:02 +0000 (11:03 +0200)
commit6bcb6d297e8e06611fb70976e8c4a8fbb39edbd7
tree9361ead70458bf1aeacf2f4873619351546f3a53
parent63e03e10380edce45196c25f98d0d248081bb446
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