195e806b2a
[ Upstream commit 13c088cf3657d70893d75cf116be937f1509cc0f ]
The size of array 'priv->ports[]' is INNO_PHY_PORT_NUM.
In the for loop, 'i' is used as the index for array 'priv->ports[]'
with a check (i > INNO_PHY_PORT_NUM) which indicates that
INNO_PHY_PORT_NUM is allowed value for 'i' in the same loop.
This > comparison needs to be changed to >=, otherwise it potentially leads
to an out of bounds write on the next iteration through the loop
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
phy-hi3660-usb3.c | ||
phy-hi6220-usb.c | ||
phy-hisi-inno-usb2.c | ||
phy-histb-combphy.c | ||
phy-hix5hd2-sata.c |