mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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>
This commit is contained in:
parent
f722406faa
commit
ad8c373c9a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue