Closed as duplicate
Closed as duplicate
Description
*Describe the bug
ctypes.c_wchar
type mismatch between windows and *nix causing wrong size calculation
Sample Code
>>> from qiling.os.windows.structs import make_os_version_info_ex
>>> make_os_version_info_ex(64, wide=True).sizeof()
540
Expected behavior
Size of OSVERSIONINFOEXW
is 284 bytes.
Screenshots
N/A
Additional context
In Windows, wchar_t
is 2 bytes, while in *nix wchar_t
is 4 bytes. That caused difference in size calculation. This is just an example, I think there are many other places in Windows api handling that might have this problem.
Metadata
Metadata
Assignees
Labels
No labels