summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-05-26 14:54:34 +0800
committerDavid Brown <davidb@codeaurora.org>2013-05-31 08:46:09 -0700
commitad8c373c9aa31d5fc56eb882ba0523d2d6d1e2f6 (patch)
tree2bfd72ece1d3cb8eb2aae74dabfb8791f08c914c /arch/arm/mach-msm
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
downloadtalos-obmc-linux-ad8c373c9aa31d5fc56eb882ba0523d2d6d1e2f6.tar.gz
talos-obmc-linux-ad8c373c9aa31d5fc56eb882ba0523d2d6d1e2f6.zip
arch: arm: mach-msm: using strlcpy instead of strncpy
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>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/clock-debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c
index 4886404d42f5..b0fbdf1cbdd1 100644
--- 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;
- strncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1);
+ strlcpy(temp, clock->dbg_name, ARRAY_SIZE(temp));
for (ptr = temp; *ptr; ptr++)
*ptr = tolower(*ptr);
OpenPOWER on IntegriCloud