Commit 5468e375 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Also check OS version to detect old binaries in GlobalMemoryStatus.

parent 49e1ba7d
......@@ -1436,7 +1436,8 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
lpBuffer->dwAvailPageFile = 2U*1024*1024*1024 - lpBuffer->dwAvailPhys - 1;
/* limit page file size for really old binaries */
if (nt->OptionalHeader.MajorSubsystemVersion < 4)
if (nt->OptionalHeader.MajorSubsystemVersion < 4 ||
nt->OptionalHeader.MajorOperatingSystemVersion < 4)
{
if (lpBuffer->dwTotalPageFile > MAXLONG) lpBuffer->dwTotalPageFile = MAXLONG;
if (lpBuffer->dwAvailPageFile > MAXLONG) lpBuffer->dwAvailPageFile = MAXLONG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment