diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-15 13:48:03 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-06-10 13:42:17 +0200 |
commit | 5d557c9cc29b05fd281ce704070cd487723fc07c (patch) | |
tree | b42e81a159a90367f5ea595517ffcab003c816b5 /drivers | |
parent | 376ab7b755abd61296eeb1d5f46935a25e907f9f (diff) |
isdn: icn: use strlcpy() when parsing setup options
commit 10640d34552ccd8fabe7b15b0c4e3a102247952d upstream.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-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 e74df7c4658f..af1577dd9825 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c @@ -1611,7 +1611,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; |