VirtualBox

Changeset 74452 in vbox for trunk


Ignore:
Timestamp:
Sep 25, 2018 10:16:07 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/ldrPE: Be less uptight about the load config structure when opening an image for validation or debug info. ticketref:17977

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp

    r73758 r74452  
    41914191    {
    41924192        IMAGE_LOAD_CONFIG_DIRECTORY64   Cfg64;
    4193         uint8_t                         abZeros[sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V7) * 4];
     4193        uint8_t                         abZeros[sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64) * 4];
    41944194    } u;
    41954195
     
    42574257         * Read, check new stuff and convert to 64-bit.
    42584258         *
    4259          * If we accepted a newer structure, we check whether the new bits are
    4260          * all zero.  This PRAYING/ASSUMING that the nothing new weird stuff is
    4261          * activated by a zero value and that it'll mostly be unused in areas
    4262          * we care about (which has been the case till now).
     4259         * If we accepted a newer structures when loading for debug or validation,
     4260         * otherwise we require the new bits to be all zero and hope that they are
     4261         * insignificant where image loading is concerned (that's mostly been the
     4262         * case even for non-zero bits, only hard exception is LockPrefixTable).
    42634263         */
    42644264        RT_ZERO(u.Cfg64);
     
    42684268        if (   fNewerStructureHack
    42694269            && Dir.Size > cbMaxKnown
     4270            && !(fFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION))
    42704271            && !ASMMemIsZero(&u.abZeros[cbMaxKnown], Dir.Size - cbMaxKnown))
    42714272        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette