summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-03-15 13:48:03 +0300
committerDavid S. Miller <davem@davemloft.net>2015-03-15 22:24:37 -0400
commit10640d34552ccd8fabe7b15b0c4e3a102247952d (patch)
treef1753c9603bc388e9483b5a3f86d6e84cd04999d
parent7d985ed1dca5c90535d67ce92ef6ca520302340a (diff)
downloadlinux-10640d34552ccd8fabe7b15b0c4e3a102247952d.tar.bz2
isdn: icn: use strlcpy() when parsing setup options
If you pass an invalid string here then you probably deserve the memory corruption, but it annoys static analysis tools so lets fix it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/isdn/icn/icn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
index 6a7447c304ac..358a574d9e8b 100644
--- a/drivers/isdn/icn/icn.c
+++ b/drivers/isdn/icn/icn.c
@@ -1609,7 +1609,7 @@ icn_setup(char *line)
if (ints[0] > 1)
membase = (unsigned long)ints[2];
if (str && *str) {
- strcpy(sid, str);
+ strlcpy(sid, str, sizeof(sid));
icn_id = sid;
if ((p = strchr(sid, ','))) {
*p++ = 0;