]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix Potential NULL pointer dereference
authoricy17 <1061499390@qq.com>
Wed, 7 Aug 2024 09:07:09 +0000 (17:07 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 7 Aug 2024 16:50:18 +0000 (18:50 +0200)
CLA: trivial

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25065)

test/sslapitest.c

index fdb5ef49f8aa7a3b779bb1f13929cc0874ca36a7..612e1aab0092ead0d456b6e57a1ef49e66aa8c89 100644 (file)
@@ -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);