about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-05-31 17:06:12 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-05-31 17:06:12 +0200
commit976f175aa9f17adc4dc1530053861fbb8383fee7 (patch)
treee43567e8d9cb0c01dd131fb654d2d64935603293
parent81a06c47a13bccd23f7cf32b3020c897bfd720d8 (diff)
downloadbox64-976f175aa9f17adc4dc1530053861fbb8383fee7.tar.gz
box64-976f175aa9f17adc4dc1530053861fbb8383fee7.zip
Fixed munmap with 0 length
-rwxr-xr-xsrc/wrapped/wrappedlibc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 0e845423..77558080 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -2008,7 +2008,7 @@ EXPORT int my_munmap(x64emu_t* emu, void* addr, unsigned long length)
     (void)emu;
     dynarec_log(LOG_DEBUG, "munmap(%p, %lu)\n", addr, length);
     #ifdef DYNAREC
-    if(box64_dynarec) {
+    if(box64_dynarec && length) {
         cleanDBFromAddressRange((uintptr_t)addr, length, 1);
     }
     #endif