Skip to content
Commit 646188c9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

net: dsa: Fix off by one in dsa_loop_port_vlan_add()



The > comparison is intended to be >= to prevent reading beyond the
end of the ps->vlans[] array.  It doesn't affect run time though because
the ps->vlans[] array has VLAN_N_VID (4096) elements and the vlan->vid
cannot be > 4094 because it is checked earlier.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/YAbyb5kBJQlpYCs2@mwanda


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0fe2f273
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment