From ba2e52ae02ee5f4547497cb9ed50b36a3d23c502 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Mon, 6 Jul 2026 22:33:28 +0200 Subject: [PATCH] tests: zero-init ccmTag to satisfy clang-tidy clang-tidy (all-c89, async-quic, intelasm) flagged `ccmTag[0] ^= 0x01` as a use of an uninitialized value: the analyzer does not model wc_AesCcmEncrypt writing the tag buffer. Zero-initialize ccmTag; the subsequent encrypt still overwrites it before the tamper, so behavior is unchanged. --- tests/api/test_aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api/test_aes.c b/tests/api/test_aes.c index 286e7ed754..f1da71aa2b 100644 --- a/tests/api/test_aes.c +++ b/tests/api/test_aes.c @@ -8514,7 +8514,7 @@ int test_wc_AesFeatureCoverage(void) }; Aes aes; byte ccmCipher[sizeof(ccmPlain)]; - byte ccmTag[16]; + byte ccmTag[16] = { 0 }; byte ccmRecovered[sizeof(ccmPlain)]; int initDone = 0;