From 18d491a6820e240a4ed4224c764a7c93b526e45f Mon Sep 17 00:00:00 2001 From: icy17 <1061499390@qq.com> Date: Wed, 7 Aug 2024 17:07:09 +0800 Subject: [PATCH] Fix Potential NULL pointer dereference CLA: trivial Reviewed-by: Paul Dale Reviewed-by: Paul Yang Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25065) --- test/sslapitest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/sslapitest.c b/test/sslapitest.c index fdb5ef49f8a..612e1aab009 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1911,6 +1911,8 @@ static int test_tlsext_status_type(void) /* First just do various checks getting and setting tlsext_status_type */ clientssl = SSL_new(cctx); + if (!TEST_ptr(clientssl)) + goto end; if (!TEST_int_eq(SSL_get_tlsext_status_type(clientssl), -1) || !TEST_true(SSL_set_tlsext_status_type(clientssl, TLSEXT_STATUSTYPE_ocsp)) @@ -1926,6 +1928,8 @@ static int test_tlsext_status_type(void) goto end; clientssl = SSL_new(cctx); + if (!TEST_ptr(clientssl)) + goto end; if (SSL_get_tlsext_status_type(clientssl) != TLSEXT_STATUSTYPE_ocsp) goto end; SSL_free(clientssl); -- 2.47.2