mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/cbs_h264_syntax_template: fix off by 1 error with slice_group_change_cycle
Fixes: assertion failure Fixes: 20390/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5683400772157440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8defd0ca7b
commit
741565a1e6
@ -1366,7 +1366,7 @@ static int FUNC(slice_header)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
(sps->pic_height_in_map_units_minus1 + 1);
|
||||
max = (pic_size + pps->slice_group_change_rate_minus1) /
|
||||
(pps->slice_group_change_rate_minus1 + 1);
|
||||
bits = av_log2(2 * max - 1);
|
||||
bits = av_ceil_log2(max + 1);
|
||||
|
||||
u(bits, slice_group_change_cycle, 0, max);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user