VirtualBox

Ignore:
Timestamp:
Apr 1, 2019 9:35:17 AM (6 years ago)
Author:
vboxsync
Message:

Runtime/ldr: Make RTLDRREADER::pfnSize return an unsigned 64bit value instead of a signed one for the raw image size and adapt all users. This avoids signed/unsigned confusions when comparing those value with others (bugref:9188)

File:
1 edited

Legend:

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

    r76553 r77971  
    8484
    8585/** @copydoc RTLDRREADER::pfnSize */
    86 static DECLCALLBACK(RTFOFF) rtldrVfsFileSize(PRTLDRREADER pReader)
     86static DECLCALLBACK(uint64_t) rtldrVfsFileSize(PRTLDRREADER pReader)
    8787{
    8888    PRTLDRREADERVFSFILE pFileReader = (PRTLDRREADERVFSFILE)pReader;
     
    121121     * Allocate memory.
    122122     */
    123     RTFOFF cbFile = rtldrVfsFileSize(pReader);
     123    uint64_t cbFile = rtldrVfsFileSize(pReader);
    124124    size_t cb = (size_t)cbFile;
    125     if ((RTFOFF)cb != cbFile)
     125    if ((uint64_t)cb != cbFile)
    126126        return VERR_IMAGE_TOO_BIG;
    127127    pFileReader->pvMapping = RTMemAlloc(cb);
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