diff options
author | Mark Harris <mark.hsj@gmail.com> | 2018-07-21 21:10:17 -0700 |
---|---|---|
committer | Mark Harris <mark.hsj@gmail.com> | 2018-07-21 21:36:34 -0700 |
commit | 1827db6a601e02729475c4618500f49f8b0cbefa (patch) | |
tree | f6cd3ed929a12b117e9766b314de108e95a00ad5 /src/opus_multistream_decoder.c | |
parent | 01b035f8ba4f48e9e1ad9f9407f77ce9a7e4aa44 (diff) | |
download | opus-1827db6a601e02729475c4618500f49f8b0cbefa.tar.gz |
Validate multistream/projection decoder frame_size
Diffstat (limited to 'src/opus_multistream_decoder.c')
-rw-r--r-- | src/opus_multistream_decoder.c | 5 |
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); |