From aa6c645c320f41aa37d7920b8dc7df403da30e10 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 2 Apr 2025 16:00:01 +0800 Subject: [PATCH] test(app_format): fixed buffer overflow in esp_app_format test --- components/esp_app_format/test_apps/main/test_app_desc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_app_format/test_apps/main/test_app_desc.c b/components/esp_app_format/test_apps/main/test_app_desc.c index 22b63f7b14..588ebf52ba 100644 --- a/components/esp_app_format/test_apps/main/test_app_desc.c +++ b/components/esp_app_format/test_apps/main/test_app_desc.c @@ -29,7 +29,7 @@ TEST(esp_app_format, esp_app_get_elf_sha256_test) int res; size_t len; - char ref_sha256[sha256_hex_len + 1]; + char ref_sha256[sha256_hex_len + 2]; const esp_app_desc_t* desc = esp_app_get_description(); for (int i = 0; i < sizeof(ref_sha256) / 2; ++i) { snprintf(ref_sha256 + 2 * i, 3, "%02x", desc->app_elf_sha256[i]);