From a552d956e86682b4af80c8fa5e6cc48282fd5a28 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 5 Dec 2011 03:56:42 +0100 Subject: Fix proc fault * proc/info.c (get_vector): Set `scanned' relatively to `readaddr' instead of to `data'. --- proc/info.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'proc') diff --git a/proc/info.c b/proc/info.c index 11625442..f35ad166 100644 --- a/proc/info.c +++ b/proc/info.c @@ -228,8 +228,6 @@ get_vector (task_t task, if (err) return err; - /* XXX fault bad here */ - /* Scan for a null. */ for (t = (vm_address_t *) (data + (scanned - readaddr)); t < (vm_address_t *) (data + readlen); @@ -248,7 +246,7 @@ get_vector (task_t task, /* If we didn't find the null terminator, then we will loop to read an additional page. */ - scanned = data + readlen; + scanned = readaddr + readlen; munmap ((caddr_t) data, readlen); } while (!err && *vec == NULL); -- cgit v1.2.3