From 2eb2cf575d5257268a47732ee1b6f4c31f6c7aa6 Mon Sep 17 00:00:00 2001 From: "tatjana.ljucovic" Date: Fri, 15 Dec 2023 14:58:41 +0100 Subject: [PATCH] Bugfix: unaligned access in MIPS getdents64 --- qiling/os/posix/syscall/unistd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qiling/os/posix/syscall/unistd.py b/qiling/os/posix/syscall/unistd.py index 3c9b91472..6bade7500 100644 --- a/qiling/os/posix/syscall/unistd.py +++ b/qiling/os/posix/syscall/unistd.py @@ -888,6 +888,7 @@ def _type_mapping(ent): d_name = (result.name if isinstance(result, os.DirEntry) else result._str).encode() + b'\x00' d_type = _type_mapping(result) d_reclen = n + n + 2 + len(d_name) + 1 + d_reclen = (d_reclen + n) & ~(n - 1) # alignment # TODO: Dirty fix for X8664 MACOS 11.6 APFS # For some reason MACOS return int value is 64bit