summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorHien Ho <hienho@google.com>2019-10-03 12:15:14 -0700
committerHien Ho <hienho@google.com>2019-10-03 23:34:50 +0000
commitca42eebf62dd42de185734aaeb346035eeee3061 (patch)
tree4d39e1c5be5c3504fa4a130471b2364648c1f6d1 /vp8
parent891c4b3ce61e76a5fea48b37cc7a5ac91e02d68a (diff)
downloadlibvpx-ca42eebf62dd42de185734aaeb346035eeee3061.tar
libvpx-ca42eebf62dd42de185734aaeb346035eeee3061.tar.gz
libvpx-ca42eebf62dd42de185734aaeb346035eeee3061.tar.bz2
libvpx-ca42eebf62dd42de185734aaeb346035eeee3061.zip
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
Diffstat (limited to 'vp8')
-rw-r--r--vp8/decoder/decodeframe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp8/decoder/decodeframe.c b/vp8/decoder/decodeframe.c
index 650d1d040..b26b1ae20 100644
--- a/vp8/decoder/decodeframe.c
+++ b/vp8/decoder/decodeframe.c
@@ -211,7 +211,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
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]));
}