]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Use strlcpy() to copy ethtool stats names
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 2 Jul 2012 20:36:59 +0000 (21:36 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 17 Jul 2012 15:12:32 +0000 (16:12 +0100)
commit9e687873850257f96f9c9c2d423a42de54e7d842
tree3e324f852c1a6d69fb721374f190b4908de1e809
parent19ba9e10eca6a3b167db6ee7c50e096ff272aec9
sfc: Use strlcpy() to copy ethtool stats names

Fix CID 113703 in the Coverity report on Linux.

ethtool stats names are limited to 32 bytes including a null
terminator.  Use strlcpy() to ensure that we will always include the
null terminator even if a source string becomes longer than this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ethtool.c