Skip to content
Commit ec38e9ef authored by Keith Packard's avatar Keith Packard Committed by Henrik Brix Andersen
Browse files

wifi/esp32: Fix overflow in SSID copy



In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.

Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent df1cd1b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment