You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the issue due to the compiler warning below.
C:\Users\username\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.7\cores\arduino\WString.cpp: In member function 'void String::remove(unsigned int, unsigned int)':
C:\Users\username\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.7\cores\arduino\WString.cpp:701:9: warning: 'char* strncpy(char*, const char*, size_t)' accessing 0 or more bytes at offsets [-1073741824, 1073741823] and [-1073741824, 1073741823] may overlap up to 4294967295 bytes at offset [5368709117, 1073741823] [-Wrestrict]
701 | strncpy(writeTo, buffer + index + count,len - index);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
In
WString.cpp
,String::remove()
should not usestrncpy()
, since its behavior is undefined when the source and destination overlap.Sources:
I noticed the issue due to the compiler warning below.
The text was updated successfully, but these errors were encountered: