VirtualBox

Changeset 46118 in vbox


Ignore:
Timestamp:
May 16, 2013 9:51:42 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85806
Message:

Make 32-bit Windows 8 symbols appear.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGPlugInWinNt.cpp

    r46108 r46118  
    427427        /* Check that sizes are within the same range and that both sizes and
    428428           addresses are within reasonable limits. */
    429         if (   RT_ALIGN(paShs[i].Misc.VirtualSize, _64K) > RT_ALIGN(paShs[i].SizeOfRawData, _64K)
     429        if (   RT_ALIGN(paShs[i].Misc.VirtualSize, _64K) < RT_ALIGN(paShs[i].SizeOfRawData, _64K)
    430430            || paShs[i].Misc.VirtualSize >= _1G
    431431            || paShs[i].SizeOfRawData    >= _1G)
     
    969969                &&  !(u.MzHdr.e_lfanew & 0x7)
    970970                &&  u.MzHdr.e_lfanew >= 0x080
    971                 &&  u.MzHdr.e_lfanew <= 0x200)
     971                &&  u.MzHdr.e_lfanew <= 0x400) /* W8 is at 0x288*/
    972972            {
    973973                IMAGE_NT_HEADERS32 const *pHdrs = (IMAGE_NT_HEADERS32 const *)&u.au8[u.MzHdr.e_lfanew];
  • trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp

    r46115 r46118  
    17051705                    return VERR_LDRPE_CERT_MALFORMED;
    17061706                }
     1707                /* When using the in-memory reader with a debugger, we may get
     1708                   into trouble here since we might not have access to the whole
     1709                   physical file.  So skip the tests below. Makes VBoxGuest.sys
     1710                   load and check out just fine, for instance. */
     1711                if (fFlags & RTLDR_O_FOR_DEBUG)
     1712                    continue;
    17071713                break;
    17081714
     
    17271733                return VERR_BAD_EXE_FORMAT;
    17281734        }
    1729         if (   pDir->VirtualAddress >= cb
    1730             && (   !(fFlags & RTLDR_O_FOR_DEBUG) /* Happens with signed drivers like VBoxGuest.sys. :-) */
    1731                 || i != IMAGE_DIRECTORY_ENTRY_SECURITY) )
     1735        if (pDir->VirtualAddress >= cb)
    17321736        {
    17331737            Log(("rtldrPEOpen: %s: dir no. %d VirtualAddress=%#x is invalid (limit %#x)!!!\n",
     
    19391943 * @param   pModPe      The PE module instance.
    19401944 * @param   pOptHdr     Pointer to the optional header (valid).
     1945 * @param   fFlags      Loader flags, RTLDR_O_XXX.
    19411946 */
    1942 int rtldrPEValidateDirectories(PRTLDRMODPE pModPe, const IMAGE_OPTIONAL_HEADER64 *pOptHdr)
     1947static int rtldrPEValidateDirectories(PRTLDRMODPE pModPe, const IMAGE_OPTIONAL_HEADER64 *pOptHdr, uint32_t fFlags)
    19431948{
    19441949    const char *pszLogName = pModPe->Core.pReader->pfnLogName(pModPe->Core.pReader); NOREF(pszLogName);
     
    20082013
    20092014    /*
    2010      * If the image is signed, take a look at the signature.
     2015     * If the image is signed and we're not doing this for debug purposes,
     2016     * take a look at the signature.
    20112017     */
    20122018    Dir = pOptHdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY];
    2013     if (Dir.Size)
     2019    if (Dir.Size && !(fFlags & RTLDR_O_FOR_DEBUG))
    20142020    {
    20152021        PWIN_CERTIFICATE pFirst = (PWIN_CERTIFICATE)RTMemTmpAlloc(Dir.Size);
     
    21632169                 * inspection of the actual data.
    21642170                 */
    2165                 rc = rtldrPEValidateDirectories(pModPe, &OptHdr);
     2171                rc = rtldrPEValidateDirectories(pModPe, &OptHdr, fFlags);
    21662172                if (RT_SUCCESS(rc))
    21672173                {
Note: See TracChangeset for help on using the changeset viewer.

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