VirtualBox

Ignore:
Timestamp:
Apr 29, 2009 9:40:48 AM (16 years ago)
Author:
vboxsync
Message:

VBoxHDD/VDI: fix heap corruption in compacting VDI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r19202 r19251  
    19051905         * compacting the image, just to be on the safe side. Update the
    19061906         * image contents straight away, as this enables cancelling. */
    1907         for (unsigned i = 0; i < cBlocks; i++)
     1907        for (unsigned i = 0; i < cBlocksAllocated; i++)
    19081908            paBlocks2[i] = VDI_IMAGE_BLOCK_FREE;
    19091909        rc = VINF_SUCCESS;
     
    19311931                    LogFunc(("Freed out of bounds reference for block %u in file \"%s\"\n",
    19321932                             i, pImage->pszFilename));
    1933                     pImage->paBlocks[i] = VDI_IMAGE_BLOCK_FREE;;
     1933                    pImage->paBlocks[i] = VDI_IMAGE_BLOCK_FREE;
    19341934                    rc = vdiUpdateBlockInfo(pImage, i);
    19351935                    if (RT_FAILURE(rc))
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