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 regularly compile my sketches with all compiler warnings enabled.
I got the following warning about a possible buffer overflow in WiFiClass::firmwareVersion():
/Users/***/Documents/Arduino/libraries/WiFi101/src/WiFi.cpp: In member function 'char* WiFiClass::firmwareVersion()':
/Users/***/Documents/Arduino/libraries/WiFi101/src/WiFi.cpp:356:10: note: 'sprintf' output between 6 and 12 bytes into a destination of size 9
356 | sprintf(_version, "%d.%d.%d", rev.u8FirmwareMajor, rev.u8FirmwareMinor, rev.u8FirmwarePatch);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The warning is legitimate.
This can be easily fixed by changing char _version[9]; to char _version[12]; in WiFi101.h
The text was updated successfully, but these errors were encountered:
I regularly compile my sketches with all compiler warnings enabled.
I got the following warning about a possible buffer overflow in
WiFiClass::firmwareVersion()
:The warning is legitimate.
This can be easily fixed by changing
char _version[9];
tochar _version[12];
in WiFi101.hThe text was updated successfully, but these errors were encountered: