shithub: libvpx

Download patch

ref: 7cb611d221c7161c9c3af1d3496c64651ec5c003
parent: aecad5a3131dc0a0ab427c50fdcb70eba22740e3
author: Hien Ho <hienho@google.com>
date: Wed Jun 19 12:41:22 EDT 2019

vp8/encoder/boolhuff: fix integer sanitizer warnings

from sanitizer run:
runtime error: 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: I9321bbd58a305419bc8669ecd7594adc47e8b116

--- a/vp8/encoder/boolhuff.h
+++ b/vp8/encoder/boolhuff.h
@@ -92,7 +92,7 @@
     }
 
     validate_buffer(bc->buffer + bc->pos, 1, bc->buffer_end, bc->error);
-    bc->buffer[bc->pos++] = (lowvalue >> (24 - offset));
+    bc->buffer[bc->pos++] = (lowvalue >> (24 - offset) & 0xff);
 
     lowvalue <<= offset;
     shift = count;