P2P: Avoid integer overflow in channel
For some 6 GHz operating class like 134, there is a possibility where the ch variable used for channel iterator overflows when it is incremented. Fix this by updating the datatype of ch variable to avoid integer overflow while incrementing. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
This commit is contained in:
parent
a58f7e61c1
commit
882c53be50
1 changed files with 1 additions and 1 deletions
|
@ -3818,7 +3818,7 @@ static int wpas_p2p_setup_channels(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
for (op = 0; global_op_class[op].op_class; op++) {
|
for (op = 0; global_op_class[op].op_class; op++) {
|
||||||
const struct oper_class_map *o = &global_op_class[op];
|
const struct oper_class_map *o = &global_op_class[op];
|
||||||
u8 ch;
|
unsigned int ch;
|
||||||
struct p2p_reg_class *reg = NULL, *cli_reg = NULL;
|
struct p2p_reg_class *reg = NULL, *cli_reg = NULL;
|
||||||
|
|
||||||
if (o->p2p == NO_P2P_SUPP ||
|
if (o->p2p == NO_P2P_SUPP ||
|
||||||
|
|
Loading…
Reference in a new issue