Changeset 31215 in vbox
- Timestamp:
- Jul 29, 2010 2:20:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r31200 r31215 155 155 { 156 156 uint32_t *pu32Bparam = NULL; 157 //** @todo r=michaln: Missing NID bounds checking! 157 158 PCODECNODE pNode = &pState->pNodes[CODEC_NID(cmd)]; 158 159 *pResp = 0; … … 184 185 { 185 186 Assert((CODEC_CAD(cmd) == pState->id)); 187 //** @todo r=michaln: This is not bounds checked and may overflow the pNodes array! 186 188 *pResp = pState->pNodes[CODEC_NID(cmd)].node.au32F00_param[cmd & CODEC_VERB_8BIT_DATA]; 187 189 return VINF_SUCCESS; … … 195 197 *pResp = pState->pNodes[CODEC_NID(cmd)].adcmux.u32F01_param; 196 198 else if (STAC9220_IS_DIGOUTPIN_CMD(cmd)) 199 //** @todo r=michaln: Is that really u32F07, or should it be u32F01? 197 200 *pResp = pState->pNodes[CODEC_NID(cmd)].digout.u32F07_param; 201 //** @todo r=michaln: Else what? We must always fill out *pResp! 198 202 return VINF_SUCCESS; 199 203 } … … 228 232 *pResp = pState->pNodes[CODEC_NID(cmd)].cdnode.u32F07_param; 229 233 else 234 //** @todo r=michaln: pResp must still be filled out 230 235 AssertMsgFailed(("Unsupported")); 231 236 return VINF_SUCCESS; … … 284 289 pu32Reg = &pState->pNodes[CODEC_NID(cmd)].volumeKnob.u32F08_param; 285 290 else 291 //** @todo r=michaln: This will crash in release builds! (pu32Reg will be NULL here) 286 292 AssertMsgFailed(("unsupported operation %x on node: %x\n", CODEC_VERB_CMD8(cmd), CODEC_NID(cmd))); 287 293 Assert(pu32Reg); … … 324 330 { 325 331 Assert((CODEC_CAD(cmd) == pState->id)); 332 //** @todo r=michaln: Again, possible pNodes array overflow 326 333 *pResp = *(uint32_t *)&pState->pNodes[CODEC_NID(cmd)].node.au8F02_param[cmd & CODEC_VERB_8BIT_DATA]; 327 334 return VINF_SUCCESS; … … 389 396 *pResp = pState->pNodes[CODEC_NID(cmd)].afg.u32F20_param; 390 397 } 398 //** @todo r=michaln: pResp must always be filled out 391 399 return VINF_SUCCESS; 392 400 } … … 458 466 else 459 467 *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? 460 469 *pResp = 0; 461 470 return VINF_SUCCESS; … … 525 534 else if (STAC9220_IS_DIGINPIN_CMD(cmd)) 526 535 *pResp = pState->pNodes[CODEC_NID(cmd)].digin.u32F0c_param; 536 //** @todo r=michaln: Do we really always want to return zero? 527 537 *pResp = 0; 528 538 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.