Commit ad8c373c authored by Chen Gang's avatar Chen Gang Committed by David Brown

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: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
parent f722406f
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment