VirtualBox

Changeset 71790 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Apr 9, 2018 4:20:20 PM (7 years ago)
Author:
vboxsync
Message:

DevPCNet: be paranoid about RAP when loading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r69500 r71790  
    43184318        /* restore data */
    43194319        SSMR3GetBool(pSSM, &pThis->fLinkUp);
    4320         SSMR3GetU32(pSSM, &pThis->u32RAP);
     4320        int rc = SSMR3GetU32(pSSM, &pThis->u32RAP);
     4321        AssertRCReturn(rc, rc);
     4322        AssertLogRelMsgReturn(pThis->u32RAP < RT_ELEMENTS(pThis->aCSR), ("%#x\n", pThis->u32RAP), VERR_SSM_LOAD_CONFIG_MISMATCH);
    43214323        SSMR3GetS32(pSSM, &pThis->iISR);
    43224324        SSMR3GetU32(pSSM, &pThis->u32Lnkst);
     
    48384840static DECLCALLBACK(int) pcnetDestruct(PPDMDEVINS pDevIns)
    48394841{
     4842    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
    48404843    PPCNETSTATE pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
    4841     PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
    48424844
    48434845    if (PDMCritSectIsInitialized(&pThis->CritSect))
     
    48574859static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    48584860{
     4861    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    48594862    PPCNETSTATE     pThis = PDMINS_2_DATA(pDevIns, PPCNETSTATE);
    48604863    PPDMIBASE       pBase;
     
    48624865    int             rc;
    48634866
    4864     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    48654867    Assert(RT_ELEMENTS(pThis->aBCR) == BCR_MAX_RAP);
    48664868    Assert(RT_ELEMENTS(pThis->aMII) == MII_MAX_REG);
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