Skip to content
Commit d68c2e1d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

net: stmmac: fix off-by-one error in sanity check



My previous patch had an off-by-one error in the added sanity
check, the arrays are MTL_MAX_{RX,TX}_QUEUES long, so if that
index is that number, it has overflown.

The patch silenced the warning anyway because the strings could
no longer overlap with the input, but they could still overlap
with other fields.

Fixes: 3e0d5699 ("net: stmmac: fix gcc-10 -Wrestrict warning")
Reported-by: default avatarRussell King (Oracle) <linux@armlinux.org.uk>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 861f40fa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment