shithub: libvpx

Download patch

ref: 12cbfbb8075376bb9819b6855f3e429c6dc458f1
parent: 0fc1b220a4bd7c22c4f9cc1b4aa9b42c4a0023c6
author: Hien Ho <hienho@google.com>
date: Thu Jun 20 05:40:46 EDT 2019

vpx_dsp/bitwriter.h: fix clang integer sanitizer warning

implicit conversion from type 'unsigned int' of value 256 (32-bit, unsigned)
to type 'uint8_t' (aka 'unsigned char') changed the value to 0 (8-bit, unsigned)


BUG=webm:1615

Change-Id: Ia9ac3772021ae492368c650a73846e7d22c8fdfc

--- a/vpx_dsp/bitwriter.h
+++ b/vpx_dsp/bitwriter.h
@@ -85,7 +85,7 @@
       br->buffer[x] += 1;
     }
 
-    br->buffer[br->pos++] = (lowvalue >> (24 - offset));
+    br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
     lowvalue <<= offset;
     shift = count;
     lowvalue &= 0xffffff;