shithub: libvpx

Download patch

ref: ca42eebf62dd42de185734aaeb346035eeee3061
parent: 891c4b3ce61e76a5fea48b37cc7a5ac91e02d68a
author: Hien Ho <hienho@google.com>
date: Thu Oct 3 08:15:14 EDT 2019

vp8/decoder/decodeframe: fix int sanitizer warnings

Unit test: VP8/InvalidFileTest
implicit conversion from type 'int' of value -45844 (32-bit, signed) to
type 'short' changed the value to 19692 (16-bit, signed)

 BUG=webm:1615
 BUG=webm:1644

Change-Id: Id5d470f706d68e24f7a1e689526c9ecd3a8e8db8

--- a/vp8/decoder/decodeframe.c
+++ b/vp8/decoder/decodeframe.c
@@ -211,7 +211,7 @@
           vp8_short_inv_walsh4x4(&b->dqcoeff[0], xd->qcoeff);
           memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
         } else {
-          b->dqcoeff[0] = b->qcoeff[0] * xd->dequant_y2[0];
+          b->dqcoeff[0] = (short)(b->qcoeff[0] * xd->dequant_y2[0]);
           vp8_short_inv_walsh4x4_1(&b->dqcoeff[0], xd->qcoeff);
           memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
         }