From: Hien Ho Date: Tue, 1 Oct 2019 23:36:56 +0000 (-0700) Subject: vp9/decoder/vp9_detokenize: fix int sanitizer warnings X-Git-Tag: v1.8.2~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f70f5dbae2f038d17a2fba4a7b20593533959fb6;p=libvpx vp9/decoder/vp9_detokenize: fix int sanitizer warnings From unit test: VP9MultiThreaded/InvalidFileTest implicit conversion from type 'int' of value 83144 (32-bit, signed) to type 'tran_low_t' (aka 'short') changed the value to 17608 (16-bit, signed) BUG=webm:1615 BUG=webm:1648 Change-Id: I4170494c328596ace66432c8563c55f31745cf76 --- diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c index e250a5a35..c2e6b3d54 100644 --- a/vp9/decoder/vp9_detokenize.c +++ b/vp9/decoder/vp9_detokenize.c @@ -243,9 +243,9 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, #endif // CONFIG_VP9_HIGHBITDEPTH #else if (read_bool(r, 128, &value, &count, &range)) { - dqcoeff[scan[c]] = -v; + dqcoeff[scan[c]] = (tran_low_t)-v; } else { - dqcoeff[scan[c]] = v; + dqcoeff[scan[c]] = (tran_low_t)v; } #endif // CONFIG_COEFFICIENT_RANGE_CHECKING ++c;