From 0adb47b3aa11face0070ea6466e73cc7c0241939 Mon Sep 17 00:00:00 2001 From: Tymoteusz Bloch Date: Tue, 31 Dec 2019 14:49:01 +0100 Subject: [PATCH 1/2] Fixed ESP8266 nullpointer dereference. --- components/wifi/esp8266-driver/ESP8266/ESP8266.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp index b7a8f2168c9..9a31dac1119 100644 --- a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp +++ b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp @@ -557,6 +557,9 @@ nsapi_error_t ESP8266::open_tcp(int id, const char *addr, int port, int keepaliv static const char *type = "TCP"; bool done = false; + if (!addr) { + return NSAPI_ERROR_PARAMETER; + } _smutex.lock(); // process OOB so that _sock_i reflects the correct state of the socket From b40ab36a6b2a2b6005a5335feab7360661194217 Mon Sep 17 00:00:00 2001 From: Tymoteusz Bloch Date: Tue, 31 Dec 2019 16:50:09 +0100 Subject: [PATCH 2/2] Incerased LPC55S69_NS heap in IAR linker script for TLS purpose. --- .../device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf index 85863bde4e1..0034019b6d2 100644 --- a/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf +++ b/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf @@ -126,7 +126,7 @@ define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_e define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end]; define block CSTACK with alignment = 8, size = __size_cstack__ { }; -define block HEAP with alignment = 8, size = __size_heap__ { }; +define block HEAP with expanding size, alignment = 8, minimum size = __heap_size__ { }; define block RW { readwrite }; define block ZI { zi };