Ignore:
Timestamp:
Nov 10, 2000, 11:14:25 AM (25 years ago)
Author:
sandervl
Message:

MN: VirtualQuery fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/virtual.cpp

    r4534 r4583  
    1 /* $Id: virtual.cpp,v 1.35 2000-10-26 17:21:39 sandervl Exp $ */
     1/* $Id: virtual.cpp,v 1.36 2000-11-10 10:14:25 sandervl Exp $ */
    22
    33/*
     
    615615        dprintf(("VirtualQuery - OSLibDosQueryMem %x %x returned %d\n",
    616616                  lpBase, cbLength, rc));
    617     SetLastError(ERROR_INVALID_PARAMETER);
     617        SetLastError(ERROR_INVALID_PARAMETER);
    618618        return 0;
    619619  }
     
    651651  if(!(dAttr & PAG_SHARED))
    652652        pmbiBuffer->Type = MEM_PRIVATE;
     653
     654  // Pages can be committed but not necessarily accessible!!
     655  if (!(dAttr & (PAG_READ | PAG_WRITE | PAG_EXECUTE | PAG_GUARD)))
     656    pmbiBuffer->Protect = PAGE_NOACCESS;
    653657
    654658  //TODO: This is not correct: AllocationProtect should contain the protection
Note: See TracChangeset for help on using the changeset viewer.