WiFi: STA connection / disconnection event handler incorrectly copies ssid
from the SDK struct
#7929
Closed
6 tasks done
Basic Infos
Platform
Problem Description
Something I noticed while looking at the event handler:
Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp
Lines 106 to 108 in 1b922ed
Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp
Lines 120 to 122 in 1b922ed
It is assumed that the pointer could be used as-is via a simple
char*
cast.Arduino/tools/sdk/include/user_interface.h
Lines 516 to 528 in 1b922ed
While it is not true from the SDK side, it is a byte string with a separate length field.
Adding this as an issue, since I also wanted to go over other possible
user_interface.h
structs with ssid + ssid_len appearances before sending the patchMCVE Sketch
Small example showing ssid.length() 33 instead of expected 32, because we read 0x20 aka ssid_len=32 plus the first 00 of zeroed out bssid[6]
Debug Messages
The text was updated successfully, but these errors were encountered: