From f50ae95ab593c116dc3f089ec0e11514896f00ef Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Thu, 27 Mar 2025 08:11:38 +0100 Subject: [PATCH] fix(lwip/cmake): avoid using uninitialized srcs variable Currently, lwip's CMakeLists.txt might use an uninitialized srcs value if CONFIG_LWIP_ENABLE is disabled. This means it could use a srcs value set by another component, involving sources that are entirely unrelated to the lwip component during registration. Perhaps we should simply exit when CONFIG_LWIP_ENABLE is not enabled and avoid registering the component altogether. Signed-off-by: Frantisek Hrbata --- components/lwip/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/components/lwip/CMakeLists.txt b/components/lwip/CMakeLists.txt index 4daec4c224..0656576f66 100644 --- a/components/lwip/CMakeLists.txt +++ b/components/lwip/CMakeLists.txt @@ -1,4 +1,5 @@ idf_build_get_property(target IDF_TARGET) +set(srcs "") if(CONFIG_LWIP_ENABLE) if(NOT ${target} STREQUAL "linux")