]> git.dujemihanovic.xyz Git - linux.git/commit
net: qed: fix the array may be out of bound
authorzhangyue <zhangyue1@kylinos.cn>
Thu, 25 Nov 2021 11:36:10 +0000 (19:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 19:29:20 +0000 (11:29 -0800)
commit0435a4d08032c8fba2966cebdac870e22238cacc
treefe2921e3354850085538e2516f80860a3b0134fb
parentbacb6c1e47691cda4a95056c21b5487fb7199fcc
net: qed: fix the array may be out of bound

If the variable 'p_bit->flags' is always 0,
the loop condition is always 0.

The variable 'j' may be greater than or equal to 32.

At this time, the array 'p_aeu->bits[32]' may be out
of bound.

Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Link: https://lore.kernel.org/r/20211125113610.273841-1-zhangyue1@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_int.c