From ec65df83c154a9b2f81bcb02e6be04c72036bdee Mon Sep 17 00:00:00 2001 From: Michael Niedermayer 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 (cherry picked from commit 242ff799c75f20bade946314c8d741d0887ee11c) Signed-off-by: Michael Niedermayer --- libavcodec/tdsc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c index 98758d78e5..ea74b30fba 100644 --- a/libavcodec/tdsc.c +++ b/libavcodec/tdsc.c @@ -242,7 +242,6 @@ static int tdsc_load_cursor(AVCodecContext *avctx) bits <<= 1; } } - dst += ctx->cursor_stride - ctx->cursor_w * 4; } dst = ctx->cursor; @@ -274,7 +273,6 @@ static int tdsc_load_cursor(AVCodecContext *avctx) bits <<= 1; } } - dst += ctx->cursor_stride - ctx->cursor_w * 4; } break; case CUR_FMT_BGRA: