Commit 85b14e60ea for ffmpeg
commit 85b14e60ea1ec46eee7e2a53fc7029a5f48b3af4
Author: Niklas Haas <git@haasn.dev>
Date: Thu Oct 22 21:05:07 2026 +0200
swscale/x86/ops_int: fix over-read in SSE4 READ_BIT
A block only covers 2 bytes of input, but movd loaded 4.
Signed-off-by: Niklas Haas <git@haasn.dev>
diff --git a/libswscale/x86/ops_int.asm b/libswscale/x86/ops_int.asm
index 692a3627ac..22540d4ce7 100644
--- a/libswscale/x86/ops_int.asm
+++ b/libswscale/x86/ops_int.asm
@@ -150,8 +150,8 @@ assert COMPS == 1
vpbroadcastd mx, [in0q]
IF V2, vpbroadcastd mx2, [in0q + 4]
%else
- movd mx, [in0q]
-IF V2, movd mx2, [in0q + 2]
+ pinsrw mx, [in0q], 0
+IF V2, pinsrw mx2, [in0q + 2], 0
%endif
mova m8, [bits_shuf]
VBROADCASTI128 m9, [bits_mask]