VirtualBox

Changeset 82304 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 30, 2019 8:10:57 PM (5 years ago)
Author:
vboxsync
Message:

DevHDA: Just fail immeidately if there are too many streams in the saved state. (We will fail later on since we won't load the entire data unit. Better to fail with a decent error message.) bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r82303 r82304  
    39453945        || pHlp->pfnSSMHandleVersion(pSSM)  >= VBOX_FULL_VERSION_MAKE(5, 2, 0))
    39463946    {
    3947         rc = pHlp->pfnSSMGetU64(pSSM, &pThis->u64WalClk);
     3947        pHlp->pfnSSMGetU64(pSSM, &pThis->u64WalClk);
    39483948        rc = pHlp->pfnSSMGetU8(pSSM, &pThis->u8IRQL);
    39493949        AssertRCReturn(rc, rc);
     
    39563956    rc = pHlp->pfnSSMGetU32(pSSM, &cStreams);
    39573957    AssertRCReturn(rc, rc);
    3958 
    3959     /** @todo r=bird: Sanity? No, insanity. You'll end up failing later on
    3960      *        because you don't load all your state, so what's the point.  Just
    3961      *        admit to a problem immediately, there is no hiding it! */
    39623958    if (cStreams > HDA_MAX_STREAMS)
    3963         cStreams = HDA_MAX_STREAMS; /* Sanity. */
    3964 
     3959        return pHlp->pfnSSMSetLoadError(pSSM, VERR_SSM_DATA_UNIT_FORMAT_CHANGED, RT_SRC_POS,
     3960                                        N_("State contains %u streams while %u is the maximum supported"),
     3961                                        cStreams, HDA_MAX_STREAMS);
    39653962    Log2Func(("cStreams=%RU32\n", cStreams));
    39663963
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