summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-05 03:56:42 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-05 03:56:42 +0100
commita552d956e86682b4af80c8fa5e6cc48282fd5a28 (patch)
tree94924deab44d09f38fee403505b075dbd2ba09ed
parenta9dae4d97b82b35ba3e03960255b605b260d1208 (diff)
Fix proc fault
* proc/info.c (get_vector): Set `scanned' relatively to `readaddr' instead of to `data'.
-rw-r--r--proc/info.c4
1 files changed, 1 insertions, 3 deletions
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);