VirtualBox

Changeset 76306 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 20, 2018 12:13:23 AM (6 years ago)
Author:
vboxsync
Message:

Runtime/fs/extvfs: Updates, reading data from ext2/ext3 filesystems seems to work to some extent [fixes]

File:
1 edited

Legend:

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

    r76305 r76306  
    10441044    else
    10451045    {
    1046         uint32_t cEntriesPerBlockMap = pThis->cbBlock << sizeof(uint32_t);
    1047         uint32_t *paBlockMap = (uint32_t *)RTMemTmpAllocZ(cEntriesPerBlockMap * sizeof(uint32_t));
     1046        uint32_t cEntriesPerBlockMap = (uint32_t)(pThis->cbBlock >> sizeof(uint32_t));
     1047        uint32_t *paBlockMap = (uint32_t *)RTMemTmpAllocZ(pThis->cbBlock);
    10481048
    10491049        if (!paBlockMap)
     
    12061206        else
    12071207        {
    1208             if (off + cbRead <= (uint64_t)pInode->ObjInfo.cbObject)
     1208            if ((uint64_t)off + cbRead <= (uint64_t)pInode->ObjInfo.cbObject)
    12091209                rc = rtFsExtInode_Read(pThis->pVol, pThis->pInode, (uint64_t)off, pSgBuf->paSegs[0].pvSeg, cbRead, NULL);
    12101210            else
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