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 1b087e9c850a16b1c3a33a8399939b8ac20e357f Author: yongdev <[email protected]> AuthorDate: Tue Aug 18 23:04:36 2026 +0000 Commit: Michael Niedermayer <[email protected]> CommitDate: Fri Sep 4 21:54:01 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 18fc8fe7d7..7acab95e03 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2291,13 +2291,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]
