VirtualBox

Changeset 106248 in vbox


Ignore:
Timestamp:
Oct 8, 2024 9:50:22 PM (7 weeks ago)
Author:
vboxsync
Message:

IPRT/ldrPE: Fixed bug in the page hashing code getting the offset of the terminator page wrong. bugref:10771

File:
1 edited

Legend:

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

    r106061 r106248  
    25072507    uint32_t        cbRawData   = pModPe->cbHeaders;
    25082508    uint32_t        offLastPage = 0;
     2509    uint32_t        cbLastPage  = 0;
    25092510
    25102511    uint32_t const  cbScratchReadMax = cbScratch / cbPage * cbPage;
     
    25242525            uint32_t const cbPageInFile  = RT_MIN(cbPage, cbRawData - offPageInSect);
    25252526            offLastPage = offPageInFile;
     2527            cbLastPage  = cbPageInFile;
    25262528
    25272529            /* Calculate and output the page offset. */
     
    26242626     * Add the terminator entry.
    26252627     */
    2626     *(uint32_t *)pbDst = offLastPage + cbPage;
     2628    *(uint32_t *)pbDst = offLastPage + cbLastPage;
    26272629    RT_BZERO(&pbDst[sizeof(uint32_t)], cbHash);
    26282630
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