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:
f722406
)
arch: arm: mach-msm: using strlcpy instead of strncpy
author
Chen Gang
<gang.chen@asianux.com>
Sun, 26 May 2013 06:54:34 +0000
(14:54 +0800)
committer
David Brown
<davidb@codeaurora.org>
Fri, 31 May 2013 15:46:09 +0000
(08:46 -0700)
For NULL terminated string, need always be sure of ended by zero.
Or the next 'ptr' in 'for' looping may cause issue.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
arch/arm/mach-msm/clock-debug.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-msm/clock-debug.c
b/arch/arm/mach-msm/clock-debug.c
index 4886404d42f587533c175e5474fdedcc4ccd680b..b0fbdf1cbdd15040709940826fe013b4c637b51d 100644
(file)
--- a/
arch/arm/mach-msm/clock-debug.c
+++ b/
arch/arm/mach-msm/clock-debug.c
@@
-104,7
+104,7
@@
int __init clock_debug_add(struct clk *clock)
if (!debugfs_base)
return -ENOMEM;
- str
ncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1
);
+ str
lcpy(temp, clock->dbg_name, ARRAY_SIZE(temp)
);
for (ptr = temp; *ptr; ptr++)
*ptr = tolower(*ptr);