Skip to content

Commit 847cd1f

Browse files
Fixed ESP8266 nullpointer dereference.
1 parent 5f495db commit 847cd1f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,9 @@ nsapi_error_t ESP8266::open_tcp(int id, const char *addr, int port, int keepaliv
557557
static const char *type = "TCP";
558558
bool done = false;
559559

560+
if (!addr) {
561+
return NSAPI_ERROR_PARAMETER;
562+
}
560563
_smutex.lock();
561564

562565
// process OOB so that _sock_i reflects the correct state of the socket

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_M33_NS/device/TOOLCHAIN_IAR/LPC55S69_cm33_core0_flash.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
5959
}
6060

6161
define symbol __stack_size__ = MBED_BOOT_STACK_SIZE;
62-
define symbol __heap_size__ = 0x4000;
62+
define symbol __heap_size__ = 0x04000;
6363

6464
define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000200 : 0;
6565
define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000001FF : 0;

0 commit comments

Comments
 (0)