VirtualBox

Changeset 93081 in vbox for trunk/src/VBox/Runtime/common/fs


Ignore:
Timestamp:
Dec 26, 2021 1:25:45 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/isovfs.cpp: Made it handle OS/2 ACP2, MCP2 and similar images that doesn't terminate the volume descriptors. Also made it deal with images containing non-conforming filenames, i.e. mixed or lower case instead of all upper case (ACP2, MCP2, ++).

File:
1 edited

Legend:

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

    r90216 r93081  
    451451
    452452
    453 
    454 /*********************************************************************************************************************************
    455 *   Global Variables                                                                                                             *
    456 *********************************************************************************************************************************/
    457 
    458 
    459453/*********************************************************************************************************************************
    460454*   Internal Functions                                                                                                           *
     
    24342428 * @param   cchEntry            The length of the compare string.
    24352429 * @param   puVersion           Where to return any file version number.
     2430 *
     2431 * @note    We're using RTStrNICmpAscii here because of non-conforming ISOs with
     2432 *          entirely lowercase name or mixed cased names.
    24362433 */
    24372434DECL_FORCE_INLINE(bool) rtFsIsoDir_IsEntryEqualAscii(PCISO9660DIRREC pDirRec, const char *pszEntry, size_t cchEntry,
    2438                                                          uint32_t *puVersion)
     2435                                                     uint32_t *puVersion)
    24392436{
    24402437    /* ASSUME directories cannot have any version tags. */
     
    24432440        if (RT_LIKELY(pDirRec->bFileIdLength != cchEntry))
    24442441            return false;
    2445         if (RT_LIKELY(memcmp(pDirRec->achFileId, pszEntry, cchEntry) != 0))
     2442        if (RT_LIKELY(RTStrNICmpAscii(pDirRec->achFileId, pszEntry, cchEntry) != 0))
    24462443            return false;
    24472444    }
     
    24532450        if (cchNameDelta == 0)
    24542451        {
    2455             if (RT_LIKELY(memcmp(pDirRec->achFileId, pszEntry, cchEntry) != 0))
     2452            if (RT_LIKELY(RTStrNICmpAscii(pDirRec->achFileId, pszEntry, cchEntry) != 0))
    24562453                return false;
    24572454            *puVersion = 1;
     
    24612458            if (RT_LIKELY(pDirRec->achFileId[cchEntry] != ';'))
    24622459                return false;
    2463             if (RT_LIKELY(memcmp(pDirRec->achFileId, pszEntry, cchEntry) != 0))
     2460            if (RT_LIKELY(RTStrNICmpAscii(pDirRec->achFileId, pszEntry, cchEntry) != 0))
    24642461                return false;
    24652462            uint32_t uVersion;
     
    57875784                                           "Not ISO? Unable to recognize volume descriptor signature: %.5Rhxs", Buf.VolDescHdr.achStdId);
    57885785        else if (enmState == kStateCdSeq)
     5786        {
     5787#if 1
     5788            /* The warp server for ebusiness update ISOs knowns as ACP2 & MCP2 ends up here,
     5789               as they do in deed miss a terminator volume descriptor and we're now at the
     5790               root directory already. Just detect this, ignore it and get on with things. */
     5791            Log(("rtFsIsoVolTryInit: Ignoring missing ISO 9660 terminator volume descriptor (found %.5Rhxs).\n",
     5792                 Buf.VolDescHdr.achStdId));
     5793            break;
     5794#else
    57895795            return RTERRINFO_LOG_SET_F(pErrInfo, VERR_VFS_BOGUS_FORMAT,
    57905796                                       "Missing ISO 9660 terminator volume descriptor? (Found %.5Rhxs)", Buf.VolDescHdr.achStdId);
     5797#endif
     5798        }
    57915799        else if (enmState == kStateUdfSeq)
    57925800            return RTERRINFO_LOG_SET_F(pErrInfo, VERR_VFS_BOGUS_FORMAT,
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