projects
/
platform
/
core
/
connectivity
/
stc-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc03654
)
Replaced strncpy() with g_strlcpy() in helper-procfs.c
37/225137/1
accepted/tizen/unified/20200227.121053
submit/tizen/20200220.041614
submit/tizen/20200227.012332
author
Jaehyun Kim
<jeik01.kim@samsung.com>
Mon, 17 Feb 2020 12:52:00 +0000
(21:52 +0900)
committer
Jaehyun Kim
<jeik01.kim@samsung.com>
Mon, 17 Feb 2020 12:54:06 +0000
(21:54 +0900)
strncpy doesn’t set zero byte implicitly.
Change-Id: I45f322916017d2b727902e713284d0e8ffa19fad
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
src/helper/helper-procfs.c
patch
|
blob
|
history
diff --git
a/src/helper/helper-procfs.c
b/src/helper/helper-procfs.c
index
60e5db2
..
a0d9f0e
100644
(file)
--- a/
src/helper/helper-procfs.c
+++ b/
src/helper/helper-procfs.c
@@
-259,7
+259,7
@@
API int proc_get_status(pid_t pid, char status[][PROC_BUF_MAX])
if (token != NULL) {
while (isspace((unsigned char)*token))
token++;
if (token != NULL) {
while (isspace((unsigned char)*token))
token++;
-
strn
cpy(status[index], token,
+
g_strl
cpy(status[index], token,
sizeof(status[index]));
updated[index] = TRUE;
}
sizeof(status[index]));
updated[index] = TRUE;
}