VirtualBox

Changeset 40137 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Feb 15, 2012 4:24:51 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76288
Message:

Runtime/Dvm: Use uint64_t instead of size_t for the number of intersecting bytes because size_t is only 32bits wide on 32bit hosts and the value can exceed the range

Location:
trunk/src/VBox/Runtime
Files:
5 edited

Legend:

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

    r40027 r40137  
    483483        PRTDVMVOLUMEINTERNAL pVol;
    484484        bool fVolFound = false;
    485         size_t cbIntersect;
     485        uint64_t cbIntersect;
    486486        uint64_t offVol;
    487487
  • trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp

    r40085 r40137  
    375375        pVol->pBsdPartitionEntry = pBsdPartitionEntry;
    376376        pVol->offStart           = (uint64_t)pBsdPartitionEntry->offSectorStart * pThis->DiskLabel.cbSector;
    377         pVol->cbVolume           = pBsdPartitionEntry->cSectors * pThis->DiskLabel.cbSector;
     377        pVol->cbVolume           = (uint64_t)pBsdPartitionEntry->cSectors * pThis->DiskLabel.cbSector;
    378378
    379379        *phVolFmt = pVol;
     
    469469                                                           uint64_t offStart, size_t cbRange,
    470470                                                           uint64_t *poffVol,
    471                                                            size_t *pcbIntersect)
     471                                                           uint64_t *pcbIntersect)
    472472{
    473473    bool fIntersect = false;
  • trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp

    r40027 r40137  
    487487                                                        uint64_t offStart, size_t cbRange,
    488488                                                        uint64_t *poffVol,
    489                                                         size_t *pcbIntersect)
     489                                                        uint64_t *pcbIntersect)
    490490{
    491491    bool fIntersect = false;
  • trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp

    r40027 r40137  
    356356                                                        uint64_t offStart, size_t cbRange,
    357357                                                        uint64_t *poffVol,
    358                                                         size_t *pcbIntersect)
     358                                                        uint64_t *pcbIntersect)
    359359{
    360360    bool fIntersect = false;
  • trunk/src/VBox/Runtime/include/internal/dvm.h

    r40028 r40137  
    215215                                                           uint64_t offStart, size_t cbRange,
    216216                                                           uint64_t *poffVol,
    217                                                            size_t *pcbIntersect);
     217                                                           uint64_t *pcbIntersect);
    218218
    219219    /**
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