diff options
author | Sung-hun Kim <sfoon.kim@samsung.com> | 2023-02-08 11:01:39 +0900 |
---|---|---|
committer | Sung-hun Kim <sfoon.kim@samsung.com> | 2023-02-08 11:01:39 +0900 |
commit | de66f0da2a333df764a55ca30d51a1ab81e73d7d (patch) | |
tree | fad4febe6955cbb8ee92df4a3643d1a00dee8542 | |
parent | 33d5fe691e99d4ce2025980cb620552d92bde577 (diff) | |
download | memps-de66f0da2a333df764a55ca30d51a1ab81e73d7d.tar.gz memps-de66f0da2a333df764a55ca30d51a1ab81e73d7d.tar.bz2 memps-de66f0da2a333df764a55ca30d51a1ab81e73d7d.zip |
Prevent possible warnings from the static analysis tooltizen_8.0_m2_releaseaccepted/tizen/unified/20230213.170656accepted/tizen/8.0/unified/20231005.093818tizen_8.0accepted/tizen_8.0_unified
Change-Id: I01f06be469807de10ac4f517008d3c36b77e4803
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
-rw-r--r-- | memps.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } |