]> git.baikalelectronics.ru Git - kernel.git/commit
net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound
authorzhangyue <zhangyue1@kylinos.cn>
Thu, 18 Nov 2021 05:46:32 +0000 (13:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 11:59:26 +0000 (11:59 +0000)
commit7395fb2a9e964c20fcd2f7357aeafb7c7eee551a
tree47681275b5b3399144d45b3cf6a006cd1ad91fc8
parent2b2b71fe483d7ca7087db4a3a80ab97aa17e9085
net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound

In line 5001, if all id in the array 'lp->phy[8]' is not 0, when the
'for' end, the 'k' is 8.

At this time, the array 'lp->phy[8]' may be out of bound.

Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/de4x5.c