Fixes: Assertion n>0 && n<=25 failed at libavcodec/get_bits.h:375 Fixes: 62618/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5145745046765568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/cbs_h2645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index fbfd671efea..a7b9f3cef33 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -93,7 +93,7 @@ static int cbs_read_se_golomb(CodedBitstreamContext *ctx, GetBitContext *gbc, max_length = FFMIN(get_bits_left(gbc), 32); - leading_bits = show_bits_long(gbc, max_length); + leading_bits = max_length ? show_bits_long(gbc, max_length) : 0; if (leading_bits == 0) { if (max_length >= 32) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid se-golomb code at " -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".