This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 678672a7860f270134eacda6a1ecd252847b0f83 Author: Linke <[email protected]> AuthorDate: Fri Mar 6 19:58:45 2026 -0700 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 16:59:28 2026 +0200 avformat/av1: fix uvlc loop past end of bitstream When get_bits_left() returns a negative value (bitstream reader already past the end of the buffer), the while condition while (get_bits_left(gb)) evaluates to true since any non-zero int is truthy. With the safe bitstream reader enabled, get_bits1() returns 0 past the buffer end, so the break never triggers and leading_zeros increments toward INT_MAX. Change the condition to > 0, consistent with skip_1stop_8data_bits() which already uses <= 0 for the same pattern. Signed-off-by: Linke <[email protected]> (cherry picked from commit e44d76f61f6beaa880e5a18405d62594252bc60c) --- libavformat/av1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/av1.c b/libavformat/av1.c index 35c23dd0b0..1a8a0a2651 100644 --- a/libavformat/av1.c +++ b/libavformat/av1.c @@ -126,8 +126,8 @@ static inline void uvlc(GetBitContext *gb) { int leading_zeros = 0; - while (get_bits_left(gb)) { - if (get_bits1(gb)) + while (leading_zeros < 32) { + if (get_bits_left(gb) < 1 || get_bits1(gb)) break; leading_zeros++; } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
