diff --git a/core.lib b/core.lib index 3787e138c6..1029889dc0 100644 --- a/core.lib +++ b/core.lib @@ -1 +1 @@ -https://github.com/mbedmicro/mbed/#bd2159db26273244d0e96714877174a32268060b +https://github.com/mbedmicro/mbed/#d0db5c94e5ce899412280d8c71d65850e0c8b30b diff --git a/drivers/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c b/drivers/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c index 8542c211a5..cc760c5cfd 100644 --- a/drivers/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c +++ b/drivers/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c @@ -26,7 +26,10 @@ size_t BufferedSerialThunk(void *buf_serial, const void *s, size_t length); int BufferedPrintfC(void *stream, int size, const char* format, va_list arg) { int r; - char buffer[size]; + char buffer[512]; + if (size >= 512) { + return -1; + } memset(buffer, 0, size); r = vsprintf(buffer, format, arg); // this may not hit the heap but should alert the user anyways diff --git a/features/storage/cfstore/source/cfstore_test.c b/features/storage/cfstore/source/cfstore_test.c index 1e0929dde4..fbd907d6f1 100644 --- a/features/storage/cfstore/source/cfstore_test.c +++ b/features/storage/cfstore/source/cfstore_test.c @@ -346,7 +346,7 @@ int32_t cfstore_test_init_1(void) char* read_buf = NULL; const uint8_t key_name_max_len = CFSTORE_KEY_NAME_MAX_LENGTH+1; uint8_t key_name_len = 0; - char key_name_buf[key_name_max_len]; + char key_name_buf[CFSTORE_KEY_NAME_MAX_LENGTH+1]; int32_t ret = ARM_DRIVER_ERROR; ARM_CFSTORE_SIZE len = 0; ARM_CFSTORE_SIZE max_len = 0;