projects
/
platform
/
core
/
connectivity
/
stc-manager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix build warnings for gcc 9
[platform/core/connectivity/stc-manager.git]
/
src
/
helper
/
helper-procfs.c
diff --git
a/src/helper/helper-procfs.c
b/src/helper/helper-procfs.c
index
8cd0461
..
60e5db2
100644
(file)
--- a/
src/helper/helper-procfs.c
+++ b/
src/helper/helper-procfs.c
@@
-79,7
+79,8
@@
API int proc_get_cmdline(pid_t pid, char *cmdline)
filename = filename + 1;
}
- strncpy(cmdline, filename, PROC_NAME_MAX-1);
+ strncpy(cmdline, filename, PROC_NAME_MAX - 1);
+ cmdline[PROC_NAME_MAX - 1] = '\0';
return STC_ERROR_NONE;
}