Skip to content

Commit

Permalink
[nrf fromlist] Fix overlapping memory build warning
Browse files Browse the repository at this point in the history
Upstream-Pr: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#5

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 28136de)
  • Loading branch information
krish2718 authored and cvinayak committed Oct 19, 2023
1 parent d434afa commit 42f9784
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,9 @@ struct interface_info* assign_wireless_interface_info(struct bss_identifier_info
int i;

for (i = 0; i < interface_count; i++) {
char ifname[16];

memcpy(ifname, interfaces[i].ifname, sizeof(ifname));
if ((interfaces[i].band == bss->band) &&
(interfaces[i].identifier == UNUSED_IDENTIFIER)) {
configured_interface_count++;
Expand All @@ -991,7 +994,7 @@ struct interface_info* assign_wireless_interface_info(struct bss_identifier_info
band_mbssid_cnt[bss->band]++;
memset(interfaces[i].hapd_conf_file, 0, sizeof(interfaces[i].hapd_conf_file));
snprintf(interfaces[i].hapd_conf_file, sizeof(interfaces[i].hapd_conf_file),
"%s/hostapd_%s.conf", HAPD_CONF_FILE_DEFAULT_PATH, interfaces[i].ifname);
"%s/hostapd_%s.conf", HAPD_CONF_FILE_DEFAULT_PATH, ifname);
return &interfaces[i];
}
}
Expand Down

0 comments on commit 42f9784

Please sign in to comment.