From: Neil Horman Date: Tue, 21 Jul 2026 18:52:59 +0000 (-0400) Subject: Fix missing NULL check in statem_clnt_construct_test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05b241cb094941c7f83ebd94d5516648d82bc2d9;p=thirdparty%2Fopenssl.git Fix missing NULL check in statem_clnt_construct_test Fixes https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1695905 Reviewed-by: Milan Broz Reviewed-by: Andrew Dinh Reviewed-by: Nikola Pajkovsky Reviewed-by: Norbert Pocs MergeDate: Thu Jul 23 08:24:25 2026 (Merged from https://github.com/openssl/openssl/pull/31992) --- diff --git a/test/statem_clnt_construct_test.c b/test/statem_clnt_construct_test.c index 10f58a3ab1a..350e59ce2f4 100644 --- a/test/statem_clnt_construct_test.c +++ b/test/statem_clnt_construct_test.c @@ -129,7 +129,8 @@ static int finish_msg(SSL *ssl, WPACKET *pkt, int mt, unsigned char **msg, { SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL(ssl); - if (!TEST_true(ssl_close_construct_packet(s, pkt, mt)) + if (!TEST_ptr(s) + || !TEST_true(ssl_close_construct_packet(s, pkt, mt)) || !TEST_true(WPACKET_get_total_written(pkt, msglen)) || !TEST_true(WPACKET_finish(pkt))) return 0;