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:26 +0000 (11:02 +0200)
commit06a0d40322e96dbba816b35f82226871f635ec5a
treed033d038e0a80070ea3dd55fd2fc347d59e1dda3
parent7551264186f176ca5801aa84d60c7b91d8fba31f
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)
test/sslapitest.c