You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/hevc/hevcdec: ensure a bit was read when checking for alignment_bit_equal_to_one
Prevents printing bogus errors about the value being 0, when in fact we overread the available slice buffer. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@ -1154,7 +1154,7 @@ static int hls_slice_header(SliceHeader *sh, const HEVCContext *s, GetBitContext
|
||||
}
|
||||
|
||||
ret = get_bits1(gb);
|
||||
if (!ret) {
|
||||
if (!ret && get_bits_left(gb) >= 0) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "alignment_bit_equal_to_one=0\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Reference in New Issue
Block a user