OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69294b5
)
libpagemap: fix reusing previous name for mappings with no name
author
Colin Cross
<ccross@android.com>
Thu, 16 May 2013 01:31:05 +0000
(18:31 -0700)
committer
Colin Cross
<ccross@android.com>
Mon, 24 Jun 2013 21:55:16 +0000
(14:55 -0700)
Mappings that are not from a file do not have a name. The sscanf
will read all of the fields up to the name, and then leave name
untouched. This causes the previous name to be reused. Reset
name to an empty string before each call to sscanf.
Change-Id: Ib146732983eb074d0d4773be094efa0b672f5ed2
libpagemap/pm_process.c
patch
|
blob
|
history
diff --git
a/libpagemap/pm_process.c
b/libpagemap/pm_process.c
index
dddff01
..
c9aa8ca
100644
(file)
--- a/
libpagemap/pm_process.c
+++ b/
libpagemap/pm_process.c
@@
-261,6
+261,7
@@
static int read_maps(pm_process_t *proc) {
map->proc = proc;
+ name[0] = '\0';
sscanf(line, "%lx-%lx %s %lx %*s %*d %" S(MAX_LINE) "s",
&map->start, &map->end, perms, &map->offset, name);