[FFmpeg-devel] [PATCH 1/6] avcodec/cbs: sei_3d_reference_displays_info uses length 0 elements
James Almer
jamrial at gmail.com
Thu Aug 1 01:03:55 EEST 2024
On 7/31/2024 4:54 PM, Michael Niedermayer wrote:
> Fixes: 70458/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5259339779080192
> Fixes: Assertion width > 0 && width <= 32 failed at libavcodec/cbs.c:608
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/cbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c
> index b26e39eab4d..dcbc86a5f7d 100644
> --- a/libavcodec/cbs.c
> +++ b/libavcodec/cbs.c
> @@ -605,7 +605,7 @@ static av_always_inline int cbs_read_unsigned(CodedBitstreamContext *ctx,
>
> CBS_TRACE_READ_START();
>
> - av_assert0(width > 0 && width <= 32);
> + av_assert0(width >= 0 && width <= 32);
No, sei_3d_reference_displays_info should instead not attempt to read
from the bitstream when width is 0.
I'll send a patch for this later.
>
> if (get_bits_left(gbc) < width) {
> av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid value at "
More information about the ffmpeg-devel
mailing list