Description
Board
Any
Device Description
Hardware Configuration
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
See similar issue for ESP8266: esp8266/Arduino#9110
In several String functions, wbuffer()[N]
is used where N
might be the size of the allocated buffer.
For example: (line 313)
arduino-esp32/cores/esp32/WString.cpp
Lines 300 to 318 in f2026f1
And this part in String::replace
:
arduino-esp32/cores/esp32/WString.cpp
Lines 772 to 780 in f2026f1
Also this one tries to copy past the allocated buffer:
arduino-esp32/cores/esp32/WString.cpp
Lines 223 to 231 in 654aead
And this one: (lines 330 and 333)
arduino-esp32/cores/esp32/WString.cpp
Lines 320 to 336 in 654aead
Maybe the simplest fix might be to adapt String::changeBuffer:
size_t newSize = (maxStrLen + 16 + 1) & (~0xf);
Sketch
-
Debug Message
-
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.