[FFmpeg-devel] [PATCH 1/6] avformat/jpegxl_anim_dec: Perform operations in a different order

Leo Izen leo.izen at gmail.com
Mon Jun 19 00:56:09 EEST 2023


On 6/18/23 17:50, Michael Niedermayer wrote:
> Fixes: OOM
> Fixes: 59802/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-5681765466112000
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>   libavformat/jpegxl_anim_dec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c
> index 6ea6c46d8f..c62b596f76 100644
> --- a/libavformat/jpegxl_anim_dec.c
> +++ b/libavformat/jpegxl_anim_dec.c
> @@ -227,7 +227,7 @@ static int jpegxl_anim_read_packet(AVFormatContext *s, AVPacket *pkt)
>       if (ctx->initial && size < ctx->initial->size)
>           size = ctx->initial->size;
>   
> -    if ((ret = av_new_packet(pkt, size) < 0))
> +    if ((ret = av_new_packet(pkt, size)) < 0)
>           return ret;
>   
>       if (ctx->initial) {

Pushed the first patch, I maintain this code and it LGTM. I left others 
pending.

- Leo Izen



More information about the ffmpeg-devel mailing list