aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-29 00:18:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-29 19:52:10 +0200
commit1ad4782d2a17d9fed38c0356f1c9f790973eec01 (patch)
treea26ce112acfbdefec3c06aafeea4724f4e92b4d0
parent109113b54f6fa7b880f66c797f7ab49d65dc7167 (diff)
downloadffmpeg-1ad4782d2a17d9fed38c0356f1c9f790973eec01.tar.gz
avcodec/siren: Improve the bits left threshold in decode_envelope()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/siren.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 6cbb3e3ba7..bdb249144b 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);