summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyeongsik Min <hyeongsik.min@samsung.com>2016-11-04 10:42:18 +0900
committerHyeongsik Min <hyeongsik.min@samsung.com>2016-11-04 10:49:15 +0900
commit6c7b7d54f013217213dc6672dd7bfa020167d45c (patch)
treed775cbed98b8580f53beff7d3b625a4701db7599
parent1256cc0af4bc61bdf00ed0785aede553c92a6f96 (diff)
downloadmemps-6c7b7d54f013217213dc6672dd7bfa020167d45c.tar.gz
memps-6c7b7d54f013217213dc6672dd7bfa020167d45c.tar.bz2
memps-6c7b7d54f013217213dc6672dd7bfa020167d45c.zip
Fix smaps parsing on 64bit kernel
In previous patch, there is a issue that memps truncates pathname when it includes blank space. Change-Id: I72770bc84c4f11b114c2dcdaad69314bacb113e4 Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
-rw-r--r--memps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memps.c b/memps.c
index db6a938..84f4f06 100644
--- a/memps.c
+++ b/memps.c
@@ -337,7 +337,7 @@ mapinfo *read_mapinfo(char** smaps, int line_cnt)
if (mi == 0)
return 0;
- n = sscanf(line, "%lx-%lx %s %*s %*s %*s %s",
+ n = sscanf(line, "%lx-%lx %s %*s %*s %*s %[^\n]",
&mi->start, &mi->end, &mi->perm, &mi->name);
if (n == 3)