]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: Use strscpy to handle stat strings
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 6 Jun 2019 08:42:56 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jun 2019 17:38:42 +0000 (10:38 -0700)
commitd0388058958b9caf2ad167a0790f9c6ddf27fa24
tree4e9f453d5fc67784c8c4644da5523d388fa49011
parentbb3da00c0f5b1f70db117e25423313ff2dca622b
net: mvpp2: Use strscpy to handle stat strings

Use a safe strscpy call to copy the ethtool stat strings into the
relevant buffers, instead of a memcpy that will be accessing
out-of-bound data.

Fixes: 8edd32450768 ("net: mvpp2: add ethtool GOP statistics")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c