From 817b7848dca5b7080ba53666eb2dd8f37b05453a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 14 Feb 2015 23:13:51 +0100 Subject: Fix mchmap. Lesson : invalid pointer dereferences happen! with unexpected results. --- src/kernel/user/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel/user') diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c index 72042d9..fc608a7 100644 --- a/src/kernel/user/process.c +++ b/src/kernel/user/process.c @@ -220,7 +220,7 @@ bool mchmap(process_t *proc, void* addr, int mode) { // change mode on already mapped pages pagedir_t *save_pd = get_current_pagedir(); switch_pagedir(proc->pd); - for (void* it = r->addr; it < r->addr + r->size; r += PAGE_SIZE) { + for (void* it = r->addr; it < r->addr + r->size; it += PAGE_SIZE) { uint32_t ent = pd_get_entry(it); uint32_t frame = pd_get_frame(it); -- cgit v1.2.3