From 0665e9b4ae3ae7ed0926a3abd04d49b21ceafa1a Mon Sep 17 00:00:00 2001 From: Hien Ho Date: Mon, 12 Aug 2019 15:26:43 -0700 Subject: [PATCH] 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 --- vp8/encoder/bitstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index 64bf0a79e..3daa4e2c2 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; -- 2.40.0