[PATCH] net: am65-cpsw-nuss: fix out-of-bounds access

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 17 05:27:04 PDT 2025


On Mon, 17 Mar 2025 12:31:42 +0100, Ahmad Fatoum wrote:
> GCC 12.2.0 complains about am65_cpsw_recv:
> 
> drivers/net/am65-cpsw-nuss.c: In function ‘am65_cpsw_recv’:
> drivers/net/am65-cpsw-nuss.c:495:30: warning: array subscript 9 is
>   above array bounds of ‘struct am65_cpsw_port[9]’ [-Warray-bounds]
>   495 |         port = &common->ports[port_id];
>       |                 ~~~~~~~~~~~~~^~~~~~~~~
> drivers/net/am65-cpsw-nuss.c:115:33: note: while referencing ‘ports’
>   115 |         struct am65_cpsw_port  ports[AM65_CPSW_CPSWNU_MAX_PORTS];
>       |                                 ^~~~~
> 
> [...]

Applied, thanks!

[1/1] net: am65-cpsw-nuss: fix out-of-bounds access
      https://git.pengutronix.de/cgit/barebox/commit/?id=9c9f95c45431 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list