From 06de22e72be26cef007b43b0bbc70fa2e1f1c08d Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 17 Oct 2024 10:57:19 -0500 Subject: [PATCH] api.c:test_wolfSSL_dtls_stateless_maxfrag(): add missing condition (clang-analyzer-core.NullDereference). --- tests/api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/api.c b/tests/api.c index cf2fa25fb7..6d765a8d52 100644 --- a/tests/api.c +++ b/tests/api.c @@ -90819,7 +90819,9 @@ static int test_wolfSSL_dtls_stateless_maxfrag(void) WOLFSSL_SUCCESS); wolfSSL_SetIOWriteCtx(ssl_c2, &test_ctx); wolfSSL_SetIOReadCtx(ssl_c2, &test_ctx); - max_fragment = ssl_s->max_fragment; + if (EXPECT_SUCCESS()) { + max_fragment = ssl_s->max_fragment; + } /* send CH */ ExpectTrue((wolfSSL_connect(ssl_c2) == WC_NO_ERR_TRACE(WOLFSSL_FATAL_ERROR)) && (ssl_c2->error == WC_NO_ERR_TRACE(WANT_READ)));