ref: 9f2a0c70d40442f3f05a575c4ea3e9eb1051a195
parent: f57908334a7b258b7e52ebdd23c910f0e4a19069
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Jan 23 08:47:40 EST 2019
Properly handle a bad stream_id in OPUS_MULTISTREAM_GET_*_STATE_REQUEST Thanks to Dmitriy for reporting this.
--- a/src/opus_multistream_decoder.c
+++ b/src/opus_multistream_decoder.c
@@ -487,7 +487,7 @@
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)
{
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -1249,7 +1249,7 @@
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)
{