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

Not a vulnerability

Fixes: irADzptPLJF2
Found-by: Qiang Li <[email protected]>



>From 41381442cb3ac0c2a0be4f4bf557512813330bdf Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sat, 19 Sep 2026 22:16:35 +0200
Subject: [PATCH] avcodec/h264dec: do not add 0 to the NULL plane pointers when
 filling a missing field

Not a vulnerability

Fixes: irADzptPLJF2
Found-by: Qiang Li <[email protected]>
---
 libavcodec/h264dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index c38f95f48c..9bb5999005 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -1001,8 +1001,8 @@ static int finalize_frame(H264Context *h, AVFrame *dst, 
H264Picture *out, int *g
             av_log(h->avctx, AV_LOG_DEBUG, "Duplicating field %d to fill 
missing\n", field);
 
             for (p = 0; p<4; p++) {
-                dst_data[p] = f->data[p] + (field^1)*f->linesize[p];
-                src_data[p] = f->data[p] +  field   *f->linesize[p];
+                dst_data[p] = FF_PTR_ADD(f->data[p], (field^1)*f->linesize[p]);
+                src_data[p] = FF_PTR_ADD(f->data[p],  field   *f->linesize[p]);
                 linesizes[p] = 2*f->linesize[p];
             }
 
-- 
2.52.0

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

Reply via email to