diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-15 11:48:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-16 03:24:37 +0100 |
commit | 10640d34552ccd8fabe7b15b0c4e3a102247952d (patch) | |
tree | f1753c9603bc388e9483b5a3f86d6e84cd04999d /drivers/isdn | |
parent | rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg() (diff) | |
download | linux-10640d34552ccd8fabe7b15b0c4e3a102247952d.tar.xz linux-10640d34552ccd8fabe7b15b0c4e3a102247952d.zip |
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; |