Open
Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Problem Description
See line 291 (and line 280):
Arduino/cores/esp8266/WString.cpp
Lines 284 to 293 in eda4e08
When allocating an array of N elements, accessing element [N]
is out of bounds.
This only happens sometimes at very specific string lengths, as setLen
only allocates in multiples of N bytes.
N.B. similar issue for ESP32, so I will also add an issue there.
Suggested fix:
reserve(length + 1);
N.B. This function is likely to be called with strlen()
or strlen_P()
as argument, which does not include the ending null character.
Metadata
Metadata
Assignees
Labels
No labels