1
0
Fork 0

fix usermode page access privilege check (fixes dck)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3006
This commit is contained in:
Sebastian Strohhäcker 2007-10-03 20:23:37 +00:00
parent 138adbcf39
commit 733a0244db

View file

@ -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;