From 81b41d40dc2d76dac7f3b7387c85b032ef21f253 Mon Sep 17 00:00:00 2001 From: Max Fillinger Date: Wed, 30 Oct 2024 18:58:50 +0100 Subject: [PATCH] Exporter tests: Fix possible uninitialized variable use Signed-off-by: Max Fillinger --- tests/suites/test_suite_ssl.function | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 88fa71b7f1..e0e1a433bf 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -5898,8 +5898,6 @@ exit: void ssl_tls_exporter_rejects_bad_parameters( int proto, int exported_key_length, int label_length, int context_length) { - MD_OR_USE_PSA_INIT(); - int ret = -1; uint8_t *key_buffer = NULL; char *label = NULL; @@ -5914,9 +5912,7 @@ void ssl_tls_exporter_rejects_bad_parameters( TEST_CALLOC(label, label_length); TEST_CALLOC(context, context_length); - memset(key_buffer, 0, exported_key_length); - memset(label, 0, label_length); - memset(context, 0, context_length); + MD_OR_USE_PSA_INIT(); ret = mbedtls_test_ssl_do_handshake_with_endpoints(&server_ep, &client_ep, &options, proto); TEST_ASSERT(ret == 0);