From b2dfe64ceaeffcec02c98f5c332f8f8e31180dbd Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 4 Sep 2022 15:20:29 +0200 Subject: Limit all libc mmap to 47bits max --- src/wrapped/wrappedlibc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 06e531e0..32aad1f8 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1465,7 +1465,7 @@ EXPORT int32_t my___open(x64emu_t* emu, void* pathname, int32_t flags, uint32_t // void* p = buf+ret; // if(hasDBFromAddress((uintptr_t)p)) { // // allow writing the whole block (this happens with HalfLife, libMiles load code directly from .mix and other file like that) -// unprotectDB((uintptr_t)p, count-ret); +// unprotectDB((uintptr_t)p, count-ret, 1); // int l; // do { // l = read(fd, p, count-ret); @@ -2231,7 +2231,7 @@ EXPORT void* my_mmap64(x64emu_t* emu, void *addr, unsigned long length, int prot // 0x40 is MAP_32BIT, wich only exist on x86_64! //flags &= ~0x40; // let the flags in? addr = findBlockNearHint(addr, length); - } else if (box64_wine) { + } else if (box64_wine || 1) { // other mmap should be restricted to 47bits if(!addr) addr = find47bitBlock(length); } -- cgit 1.4.1