This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.0 in repository ffmpeg.
commit 802ca93dd59a8a4f1fe2ac3f9e870c0f2b1fb677 Author: Hao Chen <[email protected]> AuthorDate: Tue Aug 18 00:26:47 2026 +0000 Commit: Michael Niedermayer <[email protected]> CommitDate: Thu Sep 17 01:30:42 2026 +0200 libswscale/ppc/yuv2rgb_altivec: Fix heap buffer overflow in yuv2packedX Process only complete 16-pixel blocks directly into the destination. This makes the previously unreachable scratch-buffer tail handle the remaining pixels. Remove its rewind and use the destination pixel stride for both the copy offset and length. Signed-off-by: Hao Chen <[email protected]> (cherry picked from commit 884590dd4aad5fcc7a91fbbb7af8a5da80b61d96) Signed-off-by: Michael Niedermayer <[email protected]> --- libswscale/ppc/yuv2rgb_altivec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c index cad3f8d7c0..1038896ca7 100644 --- a/libswscale/ppc/yuv2rgb_altivec.c +++ b/libswscale/ppc/yuv2rgb_altivec.c @@ -705,7 +705,7 @@ static av_always_inline void yuv2packedX_altivec(SwsInternal *c, out = (vector unsigned char *) dest; - for (i = 0; i < dstW; i += 16) { + for (i = 0; i < dstW - 15; i += 16) { Y0 = RND; Y1 = RND; /* extract 16 coeffs from lumSrc */ @@ -795,8 +795,6 @@ static av_always_inline void yuv2packedX_altivec(SwsInternal *c, } if (i < dstW) { - i -= 16; - Y0 = RND; Y1 = RND; /* extract 16 coeffs from lumSrc */ @@ -878,7 +876,8 @@ static av_always_inline void yuv2packedX_altivec(SwsInternal *c, return; } - memcpy(&((uint32_t *) dest)[i], scratch, (dstW - i) / 4); + int pixel_stride = av_pix_fmt_desc_get(target)->comp[0].step; + memcpy(&dest[i * pixel_stride], scratch, (dstW - i) * pixel_stride); } } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
