Skip to content

Commit 5cf0d8e

Browse files
committed
Updating based on the suggestion
1 parent c3f71bf commit 5cf0d8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ static void wfx_rsi_save_ap_info(void) // translation
604604
#endif
605605
sl_wifi_ssid_t ssid_arg;
606606
memset(&ssid_arg, 0, sizeof(ssid_arg));
607-
ssid_arg.length = wfx_rsi.sec.ssid_length;
607+
ssid_arg.length = chip::min<size_t>(wfx_rsi.sec.ssid_length, sizeof(ssid_arg.value) - 1);
608608
chip::Platform::CopyString((char *) &ssid_arg.value[0], ssid_arg.length + 1, wfx_rsi.sec.ssid); // +1 for null termination
609609
sl_wifi_set_scan_callback(scan_callback_handler, NULL);
610610
scan_results_complete = false;

0 commit comments

Comments
 (0)