diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-15 13:48:03 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-15 22:24:37 -0400 |
commit | 10640d34552ccd8fabe7b15b0c4e3a102247952d (patch) | |
tree | f1753c9603bc388e9483b5a3f86d6e84cd04999d /drivers/isdn | |
parent | 7d985ed1dca5c90535d67ce92ef6ca520302340a (diff) | |
download | linux-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>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/icn/icn.c | 2 |
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; |