Unverified Commit 9f2a0c70 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Properly handle a bad stream_id in OPUS_MULTISTREAM_GET_*_STATE_REQUEST

Thanks to Dmitriy for reporting this.
parent f5790833
......@@ -487,7 +487,7 @@ int opus_multistream_decoder_ctl_va_list(OpusMSDecoder *st, int request,
OpusDecoder **value;
stream_id = va_arg(ap, opus_int32);
if (stream_id<0 || stream_id >= st->layout.nb_streams)
ret = OPUS_BAD_ARG;
goto bad_arg;
value = va_arg(ap, OpusDecoder**);
if (!value)
{
......
......@@ -1249,7 +1249,7 @@ int opus_multistream_encoder_ctl_va_list(OpusMSEncoder *st, int request,
OpusEncoder **value;
stream_id = va_arg(ap, opus_int32);
if (stream_id<0 || stream_id >= st->layout.nb_streams)
ret = OPUS_BAD_ARG;
goto bad_arg;
value = va_arg(ap, OpusEncoder**);
if (!value)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment