mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 14:05:05 -04:00
net: aquantia: fixed memcpy size
Not careful array dereference caused analysis tools
to think there could be memory overflow.
There was actually no corruption because the array is
two dimensional.
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c: 140
aq_ethtool_get_strings() error:
memcpy() '*aq_ethtool_stat_names' too small (32 vs 704)
Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
699be71534
commit
ff83dbf21e
@@ -138,7 +138,7 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
|
||||
u8 *p = data;
|
||||
|
||||
if (stringset == ETH_SS_STATS) {
|
||||
memcpy(p, *aq_ethtool_stat_names,
|
||||
memcpy(p, aq_ethtool_stat_names,
|
||||
sizeof(aq_ethtool_stat_names));
|
||||
p = p + sizeof(aq_ethtool_stat_names);
|
||||
for (i = 0; i < cfg->vecs; i++) {
|
||||
|
||||
Reference in New Issue
Block a user