]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: use strlcpy() to copy a string
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 2 Oct 2012 01:47:46 +0000 (01:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Oct 2012 02:41:17 +0000 (22:41 -0400)
commitc940bf0afb736b9fb05729a1878dc6728460b954
tree3d11a64015c2ee8cb8e633326ec2d0865ffaa97b
parent25b2c607314f9ee3d8695d354cc666dcd99733d2
bnx2x: use strlcpy() to copy a string

DRV_MODULE_VERSION is smaller than the ->version buffer so the memcpy()
copies 1 byte past the end of the string.  It's not super harmful, but
it makes the static checkers complain.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c