VirtualBox

Changeset 56599 in vbox


Ignore:
Timestamp:
Jun 23, 2015 11:52:10 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101228
Message:

Warning fix (32-bit Windows).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r56319 r56599  
    962962                if (RT_SUCCESS(vrc) && pFile != NULL)
    963963                {
    964                     uint64_t cbFile = 0;
    965                     uint64_t maxFileSize = _1M;
     964                    uint64_t cbFile64 = 0;
     965                    uint32_t maxFileSize = _1M;
    966966                    size_t cbRead = 0;
     967                    size_t cbFile;
    967968                    void  *pBuf; /** @todo r=bird: You leak this buffer! throwing stuff is evil. */
    968969
    969                     vrc = RTFileGetSize(pFile, &cbFile);
    970                     if (cbFile > maxFileSize)
     970                    vrc = RTFileGetSize(pFile, &cbFile64);
     971                    if (cbFile64 > maxFileSize)
    971972                        throw setError(VBOX_E_FILE_ERROR,
    972973                                tr("Size of the manifest file '%s' is bigger than 1Mb. Check it, please."),
    973974                                RTPathFilename(strMfFile.c_str()));
    974975
     976                    cbFile = (size_t)cbFile64;    /* We know it's <= 1M. */
    975977                    if (RT_SUCCESS(vrc))
    976978                       pBuf = RTMemAllocZ(cbFile);
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