projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d985ed
)
isdn: icn: use strlcpy() when parsing setup options
author
Dan Carpenter
<dan.carpenter@oracle.com>
Sun, 15 Mar 2015 10:48:03 +0000
(13:48 +0300)
committer
David S. Miller
<davem@davemloft.net>
Mon, 16 Mar 2015 02:24:37 +0000
(22:24 -0400)
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>
drivers/isdn/icn/icn.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/isdn/icn/icn.c
b/drivers/isdn/icn/icn.c
index 6a7447c304acc39e6edc422bf8f6533acfde93b5..358a574d9e8be4d2bfed217b0448c89fe458d8f6 100644
(file)
--- 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) {
- str
cpy(sid, str
);
+ str
lcpy(sid, str, sizeof(sid)
);
icn_id = sid;
if ((p = strchr(sid, ','))) {
*p++ = 0;