Commit f2767a41 authored by Kory Maincent's avatar Kory Maincent Committed by Andrew Lunn
Browse files

net: pse-pd: Fix out of bound for loop



Adjust the loop limit to prevent out-of-bounds access when iterating over
PI structures. The loop should not reach the index pcdev->nr_lines since
we allocate exactly pcdev->nr_lines number of PI structures. This fix
ensures proper bounds are maintained during iterations.

Fixes: 9be9567a ("net: pse-pd: Add support for PSE PIs")
Signed-off-by: default avatarKory Maincent <kory.maincent@bootlin.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Acked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Message-ID: <20241015130255.125508-1-kory.maincent@bootlin.com>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
parent 07d6bf63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment