Changeset 7350 for trunk/src


Ignore:
Timestamp:
Nov 15, 2001, 4:00:15 PM (24 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

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

    r6975 r7350  
    1 /* $Id: winimagepeldr.cpp,v 1.90 2001-10-09 20:25:21 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.91 2001-11-15 14:59:06 phaller Exp $ */
    22
    33/*
     
    180180
    181181    hFile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    182 
     182 
     183    dprintf((LOG, "KERNEL32-PELDR: Opening PE-image (%s) returned handle %08xh.\n",
     184             szFileName,
     185             hFile));
     186 
    183187    //default error:
    184188    strcpy(szErrorModule, OSLibStripPath(szFileName));
     
    693697            return rc;
    694698        }
     699     
     700      // PH 2001-11-15
     701      // For corrupt or misinterpreted PE headers,
     702      // the preceeding DosSetFilePtr may have moved the
     703      // file pointer at or behind the file's end.
     704      // DosRead will then return rc=0 and ulReadBytes=0.
     705      // This must NOT lead to an infinite loop.
     706      if (ulReadBytes == 0)
     707      {
     708        return ERROR_INTERNAL;
     709      }
    695710
    696711        ulSize -= ulReadBytes;
Note: See TracChangeset for help on using the changeset viewer.