3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

hwsim: Fix radio_name_attr length calculation

This commit is contained in:
Andrew Zaborowski 2017-02-22 04:04:51 +01:00 committed by Denis Kenzior
parent 070f93fdf8
commit dfee120333

View File

@ -290,7 +290,7 @@ static void hwsim_ready(void *user_data)
msg_size += 4; msg_size += 4;
if (radio_name_attr) if (radio_name_attr)
msg_size += sizeof(radio_name_attr) + 1; msg_size += strlen(radio_name_attr) + 1;
if (no_vif_attr) if (no_vif_attr)
msg_size += 4; msg_size += 4;
@ -307,7 +307,7 @@ static void hwsim_ready(void *user_data)
if (radio_name_attr) if (radio_name_attr)
l_genl_msg_append_attr(msg, HWSIM_ATTR_RADIO_NAME, l_genl_msg_append_attr(msg, HWSIM_ATTR_RADIO_NAME,
sizeof(radio_name_attr), strlen(radio_name_attr),
radio_name_attr); radio_name_attr);
if (no_vif_attr) if (no_vif_attr)