summaryrefslogtreecommitdiff
path: root/vp8/common/x86/postproc_mmx.asm
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2014-03-24 14:54:25 -0700
committerYunqing Wang <yunqingwang@google.com>2014-03-24 14:54:25 -0700
commitc8773416fbce8a04489a9d7dd3a96ec4cee0d3d4 (patch)
treeea641e23a053d19ae2eda6892419fb47ea154653 /vp8/common/x86/postproc_mmx.asm
parent35af423e8eec380829c8ebd2296536808008fb0b (diff)
downloadlibvpx-c8773416fbce8a04489a9d7dd3a96ec4cee0d3d4.tar
libvpx-c8773416fbce8a04489a9d7dd3a96ec4cee0d3d4.tar.gz
libvpx-c8773416fbce8a04489a9d7dd3a96ec4cee0d3d4.tar.bz2
libvpx-c8773416fbce8a04489a9d7dd3a96ec4cee0d3d4.zip
Fix uninitialized read in postprocessing
This patch fixed WebRTC Issue 3020: "Uninit error at vp8_mbpost_proc_down_xmm". The first 8 values in d were not initialized, but was accessed. This patch fixed c code as well as mmx and sse2 code. Change-Id: Iaa5b41a4ed3bea971b15fb826ce34b7ab4e36fb1
Diffstat (limited to 'vp8/common/x86/postproc_mmx.asm')
-rw-r--r--vp8/common/x86/postproc_mmx.asm7
1 files changed, 5 insertions, 2 deletions
diff --git a/vp8/common/x86/postproc_mmx.asm b/vp8/common/x86/postproc_mmx.asm
index 5cf110b53..8be3431f9 100644
--- a/vp8/common/x86/postproc_mmx.asm
+++ b/vp8/common/x86/postproc_mmx.asm
@@ -204,13 +204,16 @@ sym(vp8_mbpost_proc_down_mmx):
and rcx, 15
movd DWORD PTR [rsp+rcx*4], mm1 ;d[rcx*4]
+ cmp edx, 8
+ jl .skip_assignment
+
mov rcx, rdx
sub rcx, 8
-
and rcx, 15
movd mm1, DWORD PTR [rsp+rcx*4] ;d[rcx*4]
-
movd [rsi], mm1
+
+.skip_assignment
lea rsi, [rsi+rax]
lea rdi, [rdi+rax]