Alexandre Julliard pushed to branch master at wine / wine
Commits: 0c86e45e by Pali Rohár at 2025-04-30T23:10:27+02:00 krnl386: Set carry flag for unimplemented DPMI 0800h call (Physical Address Mapping).
According to the DPMI specification, when DPMI function 0800h (Physical Address Mapping) fails then the carry flag has to be set.
For example if the application request for physical memory mapping via the DPMI 0800h call it is required to set carry flag to indicate failure. Otherwise application would be treated as successful operation in which case in BX:CX registers is stored linear address of the mapped memory to which application can access. Obviously on successful path if the BX:CX registers are not set then application would try to access random memory and crashes.
SysToolsLib, WinIO or libpci are just few examples of 32-bit Windows libraries which issue this DPMI call via the kernel32.dll VxDCall() function and are expecting either the carry flag on the failure or the valid mapped address in BX:CX registers on success.
Signed-off-by: Pali Rohár pali@kernel.org
- - - - -
1 changed file:
- dlls/krnl386.exe16/int31.c
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/0c86e45e536a1d0d2bad7216c0c6b3b...