projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d98a5f
)
fs/proc/kcore.c: using strlcpy() instead of strncpy()
author
Zhao Hongjiang
<
[email protected]
>
Wed, 3 Jul 2013 22:08:28 +0000
(15:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 3 Jul 2013 23:08:02 +0000
(16:08 -0700)
For NUL terminated string, set '\0' at the end.
Signed-off-by: Zhao Hongjiang <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/kcore.c
patch
|
blob
|
history
diff --git
a/fs/proc/kcore.c
b/fs/proc/kcore.c
index 0a22194e5d586f2dc3e7488702475746ed5f9da4..06ea155e1a590530d0c16ee964107bcf54756995 100644
(file)
--- a/
fs/proc/kcore.c
+++ b/
fs/proc/kcore.c
@@
-408,7
+408,7
@@
static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
prpsinfo.pr_zomb = 0;
strcpy(prpsinfo.pr_fname, "vmlinux");
- str
ncpy(prpsinfo.pr_psargs, saved_command_line, ELF_PRARGSZ
);
+ str
lcpy(prpsinfo.pr_psargs, saved_command_line, sizeof(prpsinfo.pr_psargs)
);
nhdr->p_filesz += notesize(¬es[1]);
bufp = storenote(¬es[1], bufp);