From: Hien Ho Date: Thu, 3 Oct 2019 19:15:14 +0000 (-0700) Subject: vp8/decoder/decodeframe: fix int sanitizer warnings X-Git-Tag: v1.8.2~85^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca42eebf62dd42de185734aaeb346035eeee3061;p=libvpx 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 --- 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])); }