projects
/
platform
/
core
/
system
/
memps.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33d5fe6
)
Prevent possible warnings from the static analysis tool
28/287928/1
accepted/tizen_8.0_unified
tizen_8.0
accepted/tizen/8.0/unified/20231005.093818
accepted/tizen/unified/20230213.170656
tizen_8.0_m2_release
author
Sung-hun Kim
<sfoon.kim@samsung.com>
Wed, 8 Feb 2023 02:01:39 +0000
(11:01 +0900)
committer
Sung-hun Kim
<sfoon.kim@samsung.com>
Wed, 8 Feb 2023 02:01:39 +0000
(11:01 +0900)
Change-Id: I01f06be469807de10ac4f517008d3c36b77e4803
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
memps.c
patch
|
blob
|
history
diff --git
a/memps.c
b/memps.c
index
26be129
..
b2a3e3d
100644
(file)
--- a/
memps.c
+++ b/
memps.c
@@
-825,6
+825,7
@@
mapinfo *load_maps_rollup(int pid)
* for getting values quickly
*/
snprintf(tmp, sizeof(tmp), "/proc/%d/smaps_rollup", pid);
+ tmp[sizeof(tmp) - 1] = '\0';
if (access(tmp, F_OK) < 0)
return 0;
return __load_maps(tmp);
@@
-835,6
+836,7
@@
mapinfo *load_maps(int pid)
char tmp[128];
snprintf(tmp, sizeof(tmp), "/proc/%d/smaps", pid);
+ tmp[sizeof(tmp) - 1] = '\0';
return __load_maps(tmp);
}