]> granicus.if.org Git - libvpx/commitdiff
vp9_quantize_ssse3_x86_64: fix out of bounds write
authorJames Zern <jzern@google.com>
Thu, 21 Dec 2017 21:51:40 +0000 (16:51 -0500)
committerJames Zern <jzern@google.com>
Thu, 21 Dec 2017 21:53:14 +0000 (16:53 -0500)
eob is a pointer to a uint16_t. previously the code would store 64-bits
causing a crash or test failure with the right stack layout.

Change-Id: Ibd653baf323db114f2444951b9d8b00c596bf15a

vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm

index 1d421f6ec193640f60ad67a38504d8b4439c3423..5703aa3bb6e89b1aae0a29ce4c5247dbf5569091 100644 (file)
@@ -169,7 +169,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, round, quant, \
   pshuflw                         m7, m8, 0x1
   pmaxsw                          m8, m7
   pextrw                          r6, m8, 0
-  mov                           [r2], r6
+  mov                           [r2], r6w
   RET
 %endmacro