From 733a0244db9d0408d0e4c3a8e4ae4eee96f827a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Wed, 3 Oct 2007 20:23:37 +0000 Subject: [PATCH] fix usermode page access privilege check (fixes dck) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3006 --- src/cpu/paging.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/paging.cpp b/src/cpu/paging.cpp index 32857009..15f01659 100644 --- a/src/cpu/paging.cpp +++ b/src/cpu/paging.cpp @@ -264,7 +264,8 @@ public: E_Exit("Pagefault didn't correct page"); } if (cpu.cpl==3) { - if ((entry.block.us==0) || (table.block.us==0) && (((entry.block.wr==0) || (table.block.wr==0)) && writing)) { +// if (((entry.block.us==0) || (table.block.us==0)) || (((entry.block.wr==0) || (table.block.wr==0)) && writing)) { + if (((entry.block.us==0) && (table.block.us==0)) || (((entry.block.wr==0) || (table.block.wr==0)) && writing)) { LOG(LOG_PAGING,LOG_NORMAL)("Page access denied: cpl=%i, %x:%x:%x:%x",cpu.cpl,entry.block.us,table.block.us,entry.block.wr,table.block.wr); if (check_only) { paging.cr2=lin_addr;