[FFmpeg-devel] [PATCH 3/3] avcodec/siren: Improve the bits left threshold in decode_envelope()
Michael Niedermayer
michael at niedermayer.cc
Wed Sep 29 01:28:35 EEST 2021
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/siren.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 8c9628e2d8e..ee7514f93c4 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -447,7 +447,7 @@ static int decode_envelope(SirenContext *s, GetBitContext *gb,
int index = 0;
do {
- if (get_bits_left(gb) < 4)
+ if (get_bits_left(gb) < 4 + number_of_regions - i + s->checksum_bits)
return AVERROR_INVALIDDATA;
index = differential_decoder_tree[i - 1][index][get_bits1(gb)];
} while (index > 0);
--
2.17.1
More information about the ffmpeg-devel
mailing list