]> git.sesse.net Git - ffmpeg/commitdiff
x86/lossless_videodsp: don't overread the dst buffer in ff_add_left_pred_unaligned_avx2
authorJames Almer <jamrial@gmail.com>
Sun, 10 Dec 2017 03:38:05 +0000 (00:38 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 10 Dec 2017 03:38:05 +0000 (00:38 -0300)
Fixes valgrind

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/x86/lossless_videodsp.asm

index 9a169fe3149a5af6e42c22ddde8efdff2a8f8957..74fc95e84b0d9fe14af80992d2ce63d320b6f999 100644 (file)
@@ -154,8 +154,7 @@ MEDIAN_PRED
     add     wq, mmsize
     jl %%.loop
 %if mmsize == 32
-    mov    eax, [dstq -1]
-    and    eax, 0xff
+    movzx   eax, byte [dstq - 1]
 %else;
     mov     eax, mmsize-1
     sub     eax, wd