Skip to content

Commit 5f9c76d

Browse files
committed
Fix size calculation bug
1 parent 978e1df commit 5f9c76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qiling/os/posix/syscall/mman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def syscall_mmap_impl(ql: Qiling, addr: int, mlen: int, prot: int, flags: int, f
8484

8585
need_mmap = True
8686
mmap_base = addr
87-
mmap_size = ql.mem.align_up(mlen - ql.mem.align(addr))
87+
mmap_size = ql.mem.align_up(mlen)
8888

8989
if ql.ostype != QL_OS.QNX:
9090
mmap_base = ql.mem.align(mmap_base)

0 commit comments

Comments
 (0)