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

Fixes: out of array access

Found-by: Seung Min Shin
Patch based on suggested fix by Seung Min Shin
Signed-off-by: Michael Niedermayer <[email protected]>


>From b3f257c96e0c61d38b5d93c788a438e8edb2fa14 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Fri, 1 May 2026 22:16:02 +0200
Subject: [PATCH] avcodec/tdsc: remove double stride adjustment

Fixes: out of array access

Found-by: Seung Min Shin
Patch based on suggested fix by Seung Min Shin
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/tdsc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c
index 225ddf3701..40a028aacd 100644
--- a/libavcodec/tdsc.c
+++ b/libavcodec/tdsc.c
@@ -240,7 +240,6 @@ static int tdsc_load_cursor(AVCodecContext *avctx)
                     bits <<= 1;
                 }
             }
-            dst += ctx->cursor_stride - ctx->cursor_w * 4;
         }
 
         dst = ctx->cursor;
@@ -272,7 +271,6 @@ static int tdsc_load_cursor(AVCodecContext *avctx)
                     bits <<= 1;
                 }
             }
-            dst += ctx->cursor_stride - ctx->cursor_w * 4;
         }
         break;
     case CUR_FMT_BGRA:
-- 
2.52.0

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

Reply via email to