Ignore:
Timestamp:
Nov 30, 1999, 4:06:55 PM (26 years ago)
Author:
sandervl
Message:

pe loader bugfix (uninit data section)

File:
1 edited

Legend:

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

    r1872 r1889  
    1 /* $Id: winimagepeldr.cpp,v 1.19 1999-11-29 00:04:06 bird Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.20 1999-11-30 15:06:55 sandervl Exp $ */
    22
    33/*
     
    548548        offset      = virtAddress - section->realvirtaddr;
    549549        sectionsize = section->virtualsize - offset;
    550         if(offset > section->rawsize) {
     550        if(offset > section->rawsize || section->type == SECTION_UNINITDATA) {
    551551                //unintialized data (set to 0)
    552552                size = 0;
     
    983983  fixup   = (ULONG *)(fixupaddr + realBaseAddress);
    984984  orgaddr = *fixup;
     985//  dprintf(("AddOff32Fixup 0x%x org 0x%x -> new 0x%x", fixup, orgaddr, realBaseAddress + (*fixup - oh.ImageBase)));
    985986  *fixup  = realBaseAddress + (*fixup - oh.ImageBase);
    986987}
     
    996997  if(fHighFixup) {
    997998        *fixup  += (USHORT)((realBaseAddress - oh.ImageBase) >> 16);
     999//        dprintf(("AddOff16FixupH 0x%x org 0x%x -> new 0x%x", fixup, orgaddr, *fixup));
    9981000  }
    9991001  else {
    10001002        *fixup  += (USHORT)((realBaseAddress - oh.ImageBase) & 0xFFFF);
     1003//        dprintf(("AddOff16FixupL 0x%x org 0x%x -> new 0x%x", fixup, orgaddr, *fixup));
    10011004  }
    10021005}
Note: See TracChangeset for help on using the changeset viewer.