From: Hien Ho Date: Mon, 12 Aug 2019 22:26:43 +0000 (-0700) Subject: vp8/encoder/bitstream: fix int sanitizer warnings X-Git-Tag: v1.8.2~134^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0665e9b4ae3ae7ed0926a3abd04d49b21ceafa1a;p=platform%2Fupstream%2Flibvpx.git vp8/encoder/bitstream: fix int sanitizer warnings implicit conversion from type 'unsigned int' of value 256 (32-bit, unsigned) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) BUG=webm:1615 Change-Id: I2b630bf22cad28b5a7a8a37f6938e6ebe12bc64e --- diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index 64bf0a7..3daa4e2 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -171,7 +171,7 @@ void vp8_pack_tokens(vp8_writer *w, const TOKENEXTRA *p, int xcount) { validate_buffer(w->buffer + w->pos, 1, w->buffer_end, w->error); - w->buffer[w->pos++] = (lowvalue >> (24 - offset)); + w->buffer[w->pos++] = (lowvalue >> (24 - offset)) & 0xff; lowvalue <<= offset; shift = count; lowvalue &= 0xffffff;