PR #23301 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23301
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23301.patch


>From b1f706e4d16387b5ea686ecf04a2896df277bac5 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sun, 31 May 2026 20:17:16 +0200
Subject: [PATCH 1/3] avcodec/cri: propagate max_pixels to the JPEG tile
 decoder

Fixes: 
489941776/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-4845035614175232
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/cri.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/cri.c b/libavcodec/cri.c
index f380597238..72f1eff9d8 100644
--- a/libavcodec/cri.c
+++ b/libavcodec/cri.c
@@ -69,6 +69,7 @@ static av_cold int cri_decode_init(AVCodecContext *avctx)
     s->jpeg_avctx->flags = avctx->flags;
     s->jpeg_avctx->flags2 = avctx->flags2;
     s->jpeg_avctx->idct_algo = avctx->idct_algo;
+    s->jpeg_avctx->max_pixels = avctx->max_pixels;
     ret = avcodec_open2(s->jpeg_avctx, NULL, NULL);
     if (ret < 0)
         return ret;
-- 
2.52.0


>From 19946f4c1d1050d1e483c0e09dddfa4501651509 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sun, 31 May 2026 20:21:47 +0200
Subject: [PATCH 2/3] avcodec/imm5: propagate max_pixels to the H264/HEVC
 sub-decoders

Fixes: 
501794495/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM5_fuzzer-5192457796255744
Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/imm5.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/imm5.c b/libavcodec/imm5.c
index b1cda453c9..d130db76ae 100644
--- a/libavcodec/imm5.c
+++ b/libavcodec/imm5.c
@@ -62,6 +62,7 @@ static av_cold int imm5_init(AVCodecContext *avctx)
     ctx->h264_avctx->thread_count = 1;
     ctx->h264_avctx->flags        = avctx->flags;
     ctx->h264_avctx->flags2       = avctx->flags2;
+    ctx->h264_avctx->max_pixels   = avctx->max_pixels;
     ret = avcodec_open2(ctx->h264_avctx, NULL, NULL);
     if (ret < 0)
         return ret;
@@ -73,6 +74,7 @@ static av_cold int imm5_init(AVCodecContext *avctx)
     ctx->hevc_avctx->thread_count = 1;
     ctx->hevc_avctx->flags        = avctx->flags;
     ctx->hevc_avctx->flags2       = avctx->flags2;
+    ctx->hevc_avctx->max_pixels   = avctx->max_pixels;
     ret = avcodec_open2(ctx->hevc_avctx, NULL, NULL);
     if (ret < 0)
         return ret;
-- 
2.52.0


>From eb2692f6c69bb408c9ec7e865baad562b7a40b77 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sun, 31 May 2026 21:26:52 +0200
Subject: [PATCH 3/3] avcodec/tdsc: propagate max_pixels to the JPEG tile
 decoder

Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/tdsc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c
index 91ea17df76..e8d37a4e3f 100644
--- a/libavcodec/tdsc.c
+++ b/libavcodec/tdsc.c
@@ -127,6 +127,7 @@ static av_cold int tdsc_init(AVCodecContext *avctx)
     ctx->jpeg_avctx->flags = avctx->flags;
     ctx->jpeg_avctx->flags2 = avctx->flags2;
     ctx->jpeg_avctx->idct_algo = avctx->idct_algo;
+    ctx->jpeg_avctx->max_pixels = avctx->max_pixels;
     ret = avcodec_open2(ctx->jpeg_avctx, NULL, NULL);
     if (ret < 0)
         return ret;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to