VirtualBox

Changeset 31215 in vbox


Ignore:
Timestamp:
Jul 29, 2010 2:20:04 PM (15 years ago)
Author:
vboxsync
Message:

Review notes.

File:
1 edited

Legend:

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

    r31200 r31215  
    155155{
    156156    uint32_t *pu32Bparam = NULL;
     157    //** @todo r=michaln: Missing NID bounds checking!
    157158    PCODECNODE pNode = &pState->pNodes[CODEC_NID(cmd)];
    158159    *pResp = 0;
     
    184185{
    185186    Assert((CODEC_CAD(cmd) == pState->id));
     187    //** @todo r=michaln: This is not bounds checked and may overflow the pNodes array!
    186188    *pResp = pState->pNodes[CODEC_NID(cmd)].node.au32F00_param[cmd & CODEC_VERB_8BIT_DATA];
    187189    return VINF_SUCCESS;
     
    195197        *pResp = pState->pNodes[CODEC_NID(cmd)].adcmux.u32F01_param;
    196198    else if (STAC9220_IS_DIGOUTPIN_CMD(cmd))
     199        //** @todo r=michaln: Is that really u32F07, or should it be u32F01?
    197200        *pResp = pState->pNodes[CODEC_NID(cmd)].digout.u32F07_param;
     201    //** @todo r=michaln: Else what? We must always fill out *pResp!
    198202    return VINF_SUCCESS;
    199203}
     
    228232        *pResp = pState->pNodes[CODEC_NID(cmd)].cdnode.u32F07_param;
    229233    else
     234        //** @todo r=michaln: pResp must still be filled out
    230235        AssertMsgFailed(("Unsupported"));
    231236    return VINF_SUCCESS;
     
    284289        pu32Reg = &pState->pNodes[CODEC_NID(cmd)].volumeKnob.u32F08_param;
    285290    else
     291        //** @todo r=michaln: This will crash in release builds! (pu32Reg will be NULL here)
    286292        AssertMsgFailed(("unsupported operation %x on node: %x\n", CODEC_VERB_CMD8(cmd), CODEC_NID(cmd)));
    287293    Assert(pu32Reg);
     
    324330{
    325331    Assert((CODEC_CAD(cmd) == pState->id));
     332    //** @todo r=michaln: Again, possible pNodes array overflow
    326333    *pResp = *(uint32_t *)&pState->pNodes[CODEC_NID(cmd)].node.au8F02_param[cmd & CODEC_VERB_8BIT_DATA];
    327334    return VINF_SUCCESS;
     
    389396        *pResp = pState->pNodes[CODEC_NID(cmd)].afg.u32F20_param;
    390397    }
     398    //** @todo r=michaln: pResp must always be filled out
    391399    return VINF_SUCCESS;
    392400}
     
    458466    else
    459467        *pResp = 0; /* STAC9220 6.20 6.13-6.18: no response supposed for this verb. */
     468    //** @todo r=michaln: Is this intentional? I don't think we should always return 0?
    460469    *pResp = 0;
    461470    return VINF_SUCCESS;
     
    525534    else if (STAC9220_IS_DIGINPIN_CMD(cmd))
    526535        *pResp = pState->pNodes[CODEC_NID(cmd)].digin.u32F0c_param;
     536    //** @todo r=michaln: Do we really always want to return zero?
    527537    *pResp = 0;
    528538    return VINF_SUCCESS;
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