This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit e5b4d3c5974c03f9ebdaef48a4156761ee2ffb8e Author: yongdev <[email protected]> AuthorDate: Tue Aug 18 23:04:36 2026 +0000 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 14:27:11 2026 +0200 libswscale: use unaligned read/write macros in planarCopyWrapper When performing unscaled planar copies or format conversions on 16-bit buffers in planarCopyWrapper, srcPtr2 and dstPtr2 are not guaranteed to be 8-byte aligned (e.g. subsampled chroma planes with non-multiple-of-8 widths/strides or odd slice offsets). AV_RN64A / AV_WN64A and AV_RN32A / AV_WN32A cast pointers to av_alias64 or av_alias32 which have __attribute__((aligned(8))) or aligned(4). Dereferencing unaligned pointers with aligned attribute triggers Undefined Behavior traps (SIGILL / UD1 instruction with Clang -fsanitize=alignment). Replace them with AV_RN64 / AV_WN64 and AV_RN32 / AV_WN32. Signed-off-by: yongdev <[email protected]> (cherry picked from commit c9e36046a338638279782cba4fba3299bf65f46b) Signed-off-by: Michael Niedermayer <[email protected]> --- libswscale/swscale_unscaled.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index cd5e76cfc7..e3f0f34b26 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2282,13 +2282,13 @@ static int planarCopyWrapper(SwsInternal *c, const uint8_t *const src[], shiftonly) { #if HAVE_FAST_64BIT for (; j < length - 3; j += 4) { - uint64_t v = AV_RN64A(srcPtr2 + j) >> src_shift; - AV_WN64A(dstPtr2 + j, (v << shift) << dst_shift); + uint64_t v = AV_RN64(srcPtr2 + j) >> src_shift; + AV_WN64(dstPtr2 + j, (v << shift) << dst_shift); } #else for (; j < length - 1; j += 2) { - uint32_t v = AV_RN32A(srcPtr2 + j) >> src_shift; - AV_WN32A(dstPtr2 + j, (v << shift) << dst_shift); + uint32_t v = AV_RN32(srcPtr2 + j) >> src_shift; + AV_WN32(dstPtr2 + j, (v << shift) << dst_shift); } #endif } -- 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]
