Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2019-01-23 21:47:40 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2019-01-23 21:48:31 +0300
commit9f2a0c70d40442f3f05a575c4ea3e9eb1051a195 (patch)
tree833416d2b80eb9538d84367cd27201865e60e1a5 /src
parentf57908334a7b258b7e52ebdd23c910f0e4a19069 (diff)
Properly handle a bad stream_id in OPUS_MULTISTREAM_GET_*_STATE_REQUEST
Thanks to Dmitriy for reporting this.
Diffstat (limited to 'src')
-rw-r--r--src/opus_multistream_decoder.c2
-rw-r--r--src/opus_multistream_encoder.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c
index 562103cd..0018517a 100644
--- a/src/opus_multistream_decoder.c
+++ b/src/opus_multistream_decoder.c
@@ -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)
{
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 9cb9bf34..93204a14 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -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)
{