From a8eed53bc2f329e99d8a1181136834b4c8f7663e Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 20 Mar 2024 10:57:08 +0100 Subject: [PATCH] fix(lwip): Fix null dereference if we cannot allocate semaphore * Update submodule: git log --oneline f7922143..a1bd9e44 Detailed description of the changes: - api_msg: Fix crash to fail-safe error if cannot get semaphore (espressif/esp-lwip@a1bd9e44) --- components/lwip/lwip | 2 +- components/lwip/port/freertos/include/arch/sys_arch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lwip/lwip b/components/lwip/lwip index f79221431f..a1bd9e441b 160000 --- a/components/lwip/lwip +++ b/components/lwip/lwip @@ -1 +1 @@ -Subproject commit f79221431fa9042b3572d271d687de66da7560c4 +Subproject commit a1bd9e441b10a94f97ec8c20daf7fa90983e7cc2 diff --git a/components/lwip/port/freertos/include/arch/sys_arch.h b/components/lwip/port/freertos/include/arch/sys_arch.h index ba85471397..f945a14c0c 100644 --- a/components/lwip/port/freertos/include/arch/sys_arch.h +++ b/components/lwip/port/freertos/include/arch/sys_arch.h @@ -63,7 +63,7 @@ void sys_delay_ms(uint32_t ms); */ #define sys_mbox_set_invalid( x ) *x = NULL -#define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) +#define sys_sem_valid( x ) ( ( (x) == NULL ) ? pdFALSE : ( ( *x ) == NULL ? pdFALSE : pdTRUE ) ) #define sys_sem_set_invalid( x ) ( ( *x ) = NULL ) void sys_delay_ms(uint32_t ms);