From ea2e458648fe253abe8547581a26698d2b5e74c9 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Fri, 23 Jul 2010 19:35:20 +0300 Subject: [PATCH] parser: Avoid too long reads from /proc/pid/pageframe The correct amount is always one 8 byte entry for each 4096 size pages. Signed-off-by: Timo Kokkonen --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index c35fbe1..b405706 100644 --- a/parse.c +++ b/parse.c @@ -203,7 +203,7 @@ static int parse_pageframe(FILE *file, struct pageframe *pf_tree, /* Go through the list of allocated memory areas */ list_for_each_entry(map, &maps->list, list) { start = map->start >> (PAGE_SHIFT - 3); - len = map->size >> (PAGE_SHIFT - 3); + len = map->size >> (PAGE_SHIFT); ret = fseek(file, start, SEEK_SET); if (ret) { -- 2.45.0