Changeset 3824 for trunk/src


Ignore:
Timestamp:
Jul 15, 2000, 11:14:26 AM (25 years ago)
Author:
sandervl
Message:

better check for pe images

File:
1 edited

Legend:

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

    r3765 r3824  
    1 /* $Id: winimagebase.cpp,v 1.23 2000-06-28 18:08:35 sandervl Exp $ */
     1/* $Id: winimagebase.cpp,v 1.24 2000-07-15 09:14:26 sandervl Exp $ */
    22
    33/*
     
    252252  rc = DosRead(win32handle, pdoshdr, sizeof(IMAGE_DOS_HEADER), &ulRead);
    253253  if(rc != NO_ERROR) {
     254        free(pdoshdr);
     255        DosClose(win32handle);                /* Close the file */
     256        return ERROR_INVALID_EXE_SIGNATURE_W;
     257  }
     258  if(pdoshdr->e_magic != IMAGE_DOS_SIGNATURE) {
     259        free(pdoshdr);
    254260        DosClose(win32handle);                /* Close the file */
    255261        return ERROR_INVALID_EXE_SIGNATURE_W;
Note: See TracChangeset for help on using the changeset viewer.