diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-04-21 18:46:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-25 11:25:37 +0100 |
commit | 9810c58c7051ae83e7ac326fca3daa823da6b778 (patch) | |
tree | fa203e08bc40fedd9fe7c952dea07a3dfec44d87 /drivers/i2c/i2c-boardinfo.c | |
parent | 4e2e65e2e56c6ceb4ea1719360080c0af083229e (diff) | |
download | linux-9810c58c7051ae83e7ac326fca3daa823da6b778.tar.bz2 |
net: lan966x: fix a couple off by one bugs
The lan966x->ports[] array has lan966x->num_phys_ports elements. These
are assigned in lan966x_probe(). That means the > comparison should be
changed to >=.
The first off by one check is harmless but the second one could lead to
an out of bounds access and a crash.
Fixes: 5ccd66e01cbe ("net: lan966x: add support for interrupts from analyzer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/i2c/i2c-boardinfo.c')
0 files changed, 0 insertions, 0 deletions