VirtualBox

Changeset 93350 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jan 19, 2022 9:53:56 PM (3 years ago)
Author:
vboxsync
Message:

IPRT/isomaker: Don't freak out if the joliet volume descriptor gives the VolumeSpaceSize as smaller than the primary one, as happens with ubuntu-21.10-desktop-amd64.iso.

File:
1 edited

Legend:

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

    r93115 r93350  
    20182018
    20192019    if (ISO9660_GET_ENDIAN(&pVolDesc->VolumeSpaceSize) != pThis->cBlocksInPrimaryVolumeSpace)
    2020         return rtFsIsoImpError(pThis, VERR_ISOMK_IMPORT_INVALID_VOLUMNE_SEQ_NO,
    2021                                "Volume space size differs between primary and supplementary descriptors: %#x, primary %#x",
    2022                                ISO9660_GET_ENDIAN(&pVolDesc->VolumeSpaceSize), pThis->cBlocksInPrimaryVolumeSpace);
     2020    {
     2021        /* ubuntu-21.10-desktop-amd64.iso has 0x172f4e blocks (3 111 809 024 bytes) here
     2022           and 0x173838 blocks (3 116 482 560 bytes) in the primary, a difference of
     2023           -2282 blocks (-4 673 536 bytes).  Guess something was omitted from the joliet
     2024           edition, not immediately obvious what though.
     2025
     2026           For now we'll just let it pass as long as the primary size is the larger.
     2027           (Not quite sure how the code will handle a supplementary volume spanning
     2028           more space, as I suspect it only uses the primary volume size for
     2029           validating block addresses and such.) */
     2030        LogRel(("rtFsIsoImportProcessSupplementaryDesc: Volume space size differs between primary and supplementary descriptors: %#x, primary %#x",
     2031                ISO9660_GET_ENDIAN(&pVolDesc->VolumeSpaceSize), pThis->cBlocksInPrimaryVolumeSpace));
     2032        if (ISO9660_GET_ENDIAN(&pVolDesc->VolumeSpaceSize) > pThis->cBlocksInPrimaryVolumeSpace)
     2033            return rtFsIsoImpError(pThis, VERR_ISOMK_IMPORT_VOLUME_SPACE_SIZE_MISMATCH,
     2034                                   "Volume space given in the supplementary descriptor is larger than in the primary: %#x, primary %#x",
     2035                                   ISO9660_GET_ENDIAN(&pVolDesc->VolumeSpaceSize), pThis->cBlocksInPrimaryVolumeSpace);
     2036    }
    20232037
    20242038    /*
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