VirtualBox

Changeset 53820 in vbox


Ignore:
Timestamp:
Jan 15, 2015 1:52:02 PM (10 years ago)
Author:
vboxsync
Message:

SUPHardenedVerfiyImage-win.cpp: Tell RTLdr to disregard the specified arch if there is no code in the DLL, this is what LdrLoadDll does.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp

    r53220 r53820  
    12331233         * Open the image.
    12341234         */
    1235         RTLDRMOD hLdrMod;
    1236         RTLDRARCH enmArch = fFlags & SUPHNTVI_F_RC_IMAGE ? RTLDRARCH_X86_32 : RTLDRARCH_HOST;
     1235        RTLDRMOD  hLdrMod;
     1236        RTLDRARCH enmArch   = fFlags & SUPHNTVI_F_RC_IMAGE ? RTLDRARCH_X86_32 : RTLDRARCH_HOST;
     1237        uint32_t  fLdrFlags = RTLDR_O_FOR_VALIDATION | RTLDR_O_IGNORE_ARCH_IF_NO_CODE;
    12371238        if (fFlags & SUPHNTVI_F_IGNORE_ARCHITECTURE)
    1238             enmArch = RTLDRARCH_WHATEVER;
    1239         rc = RTLdrOpenWithReader(&pNtViRdr->Core, RTLDR_O_FOR_VALIDATION, enmArch, &hLdrMod, pErrInfo);
     1239            fLdrFlags |= RTLDR_O_IGNORE_ARCH_IF_NO_CODE;
     1240        rc = RTLdrOpenWithReader(&pNtViRdr->Core, fLdrFlags, enmArch, &hLdrMod, pErrInfo);
    12401241        if (RT_SUCCESS(rc))
    12411242        {
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