Ignore:
Timestamp:
Dec 21, 2011, 8:16:15 PM (14 years ago)
Author:
dmik
Message:

Fix hang when loading KERNEL32.DLL from high-mem enabled application.

DosDevConfig() is not high-mem safe.

File:
1 edited

Legend:

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

    r21916 r21925  
    34353435                         ULONG item)
    34363436{
    3437   return (DWORD)DosDevConfig(pdevinfo, item);
     3437  // DosDevConfig() is not high-mem safe, use a low-mem stack variable
     3438  // (according to CPREF, "All returned device information is BYTE-sized,
     3439  // so [the argument] should be the address of a BYTE variable"
     3440  BYTE devinfo;
     3441  DWORD rc = (DWORD)DosDevConfig(&devinfo, item);
     3442  *((PBYTE)pdevinfo) = devinfo;
     3443  return rc;
    34383444}
    34393445//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.