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
diff options
context:
space:
mode:
authorMark Harris <mark.hsj@gmail.com>2018-07-22 07:10:17 +0300
committerMark Harris <mark.hsj@gmail.com>2018-07-22 07:36:34 +0300
commit1827db6a601e02729475c4618500f49f8b0cbefa (patch)
treef6cd3ed929a12b117e9766b314de108e95a00ad5 /src/opus_multistream_decoder.c
parent01b035f8ba4f48e9e1ad9f9407f77ce9a7e4aa44 (diff)
Validate multistream/projection decoder frame_size
Diffstat (limited to 'src/opus_multistream_decoder.c')
-rw-r--r--src/opus_multistream_decoder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c
index f767ea0d..e0bd4c66 100644
--- a/src/opus_multistream_decoder.c
+++ b/src/opus_multistream_decoder.c
@@ -201,6 +201,11 @@ int opus_multistream_decode_native(
ALLOC_STACK;
VALIDATE_MS_DECODER(st);
+ if (frame_size <= 0)
+ {
+ RESTORE_STACK;
+ return OPUS_BAD_ARG;
+ }
/* Limit frame_size to avoid excessive stack allocations. */
MUST_SUCCEED(opus_multistream_decoder_ctl(st, OPUS_GET_SAMPLE_RATE(&Fs)));
frame_size = IMIN(frame_size, Fs/25*3);