Skip to content
Commit ba5c2523 authored by Colin Ian King's avatar Colin Ian King Committed by Johannes Berg
Browse files

nl80211/cfg80211: fix potential infinite loop



The for-loop iterates with a u8 loop counter and compares this
with the loop upper limit of request->n_ssids which is an int type.
There is a potential infinite loop if n_ssids is larger than the
u8 loop counter, so fix this by making the loop counter an int.

Addresses-Coverity: ("Infinite loop")
Fixes: c8cb5b85 ("nl80211/cfg80211: support 6 GHz scanning")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201029222407.390218-1-colin.king@canonical.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 9c97c88d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment