P2P: Fix memory size for os_memmove() in p2p_check_pref_chan()
'sizeof' was not used with os_memmove() for an integer array. This lead
to an issue with part of the preferred channel list not being used.
Fixes: 79329ae0aa
("P2P: Verify local driver preferred frequencies for P2P use cases")
Signed-off-by: Daichi Ueura <daichi.ueura@sony.com>
This commit is contained in:
parent
c4193b9aa5
commit
4da91881cb
1 changed files with 3 additions and 1 deletions
|
@ -676,7 +676,9 @@ void p2p_check_pref_chan(struct p2p_data *p2p, int go,
|
|||
"Ignore local driver frequency preference %u MHz since it is not acceptable for P2P use (go=%d)",
|
||||
freq_list[i], go);
|
||||
if (size - i - 1 > 0)
|
||||
os_memmove(&freq_list[i], &freq_list[i + 1], size - i - 1);
|
||||
os_memmove(&freq_list[i], &freq_list[i + 1],
|
||||
(size - i - 1) *
|
||||
sizeof(unsigned int));
|
||||
size--;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue