[FFmpeg-cvslog] x86/lossless_videodsp: don't overread the dst buffer in ff_add_left_pred_unaligned_avx2

James Almer git at videolan.org
Sun Dec 10 05:54:20 EET 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Dec 10 00:38:05 2017 -0300| [a4fc63c0f9eb803340c47479dcc5403b6fe3316d] | committer: James Almer

x86/lossless_videodsp: don't overread the dst buffer in ff_add_left_pred_unaligned_avx2

Fixes valgrind

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a4fc63c0f9eb803340c47479dcc5403b6fe3316d
---

 libavcodec/x86/lossless_videodsp.asm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/x86/lossless_videodsp.asm b/libavcodec/x86/lossless_videodsp.asm
index 9a169fe314..74fc95e84b 100644
--- a/libavcodec/x86/lossless_videodsp.asm
+++ b/libavcodec/x86/lossless_videodsp.asm
@@ -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



More information about the ffmpeg-cvslog mailing list