Skip to content

Commit f159b88

Browse files
Update examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp
Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com>
1 parent 8d60acc commit f159b88

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ sl_status_t show_scan_results(sl_wifi_scan_result_t * scan_result)
545545

546546
cur_scan_result.ssid_length = strnlen((char *) scan_result->scan_info[idx].ssid,
547547
chip::min<size_t>(sizeof(scan_result->scan_info[idx].ssid), WFX_MAX_SSID_LENGTH));
548+
// cur_scan_result.ssid is of size WFX_MAX_SSID_LENGTH+1, we are safe with the cur_scan_result.ssid_length calculated above
548549
chip::Platform::CopyString(cur_scan_result.ssid, cur_scan_result.ssid_length + 1, (char *) scan_result->scan_info[idx].ssid); // +1 for null termination
549550

550551
// if user has provided ssid, then check if the current scan result ssid matches the user provided ssid

0 commit comments

Comments
 (0)