Merge "vp8/encoder/boolhuff: fix integer sanitizer warnings"
diff --git a/vp8/encoder/boolhuff.h b/vp8/encoder/boolhuff.h
index 8ac0a2c..8cc61bd 100644
--- 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;