s2io: use snprintf() as a safety feature
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 19 Jan 2015 19:34:51 +0000 (22:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jan 2015 00:42:21 +0000 (19:42 -0500)
commita8c1d28ac3925b99b5a939617d3fef1644298ee8
treef068125515f1490894aa9313d0078895db84d0b1
parentef5a1ba145b95aafab823f833ad9b77d2ccc39bf
s2io: use snprintf() as a safety feature

"sp->desc[i]" has 25 characters.  "dev->name" has 15 characters.  If we
used all 15 characters then the sprintf() would overflow.

I changed the "sprintf(sp->name, "%s Neterion %s"" to snprintf(), as
well, even though it can't overflow just to be consistent.

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