coreaudio: Verify valid lineId in MIXER_GETLINECONTROLSF_ONEBYTYPE.
This commit is contained in:
parent
35ecb1b6ee
commit
b314f13219
|
@ -760,6 +760,11 @@ static DWORD MIX_GetLineControls(WORD wDevID, LPMIXERLINECONTROLSW lpMlc, DWORD_
|
|||
break;
|
||||
case MIXER_GETLINECONTROLSF_ONEBYTYPE:
|
||||
TRACE("dwLineID=%d MIXER_GETLINECONTROLSF_ONEBYTYPE (%s)\n", lpMlc->dwLineID, getControlType(lpMlc->u.dwControlType));
|
||||
if ( (lpMlc->dwLineID < 0) || (lpMlc->dwLineID >= mixer.caps.cDestinations) )
|
||||
{
|
||||
ret = MIXERR_INVALLINE;
|
||||
break;
|
||||
}
|
||||
if (lpMlc->u.dwControlType == MIXERCONTROL_CONTROLTYPE_VOLUME)
|
||||
{
|
||||
ctrl = (lpMlc->dwLineID * ControlsPerLine) + IDControlVolume;
|
||||
|
|
Loading…
Reference in New Issue