ref: d8ef726611459a40e4e27a6602855bc27535a548
parent: 16583ccde906399758edf73b94bbcf16911ee173
author: Werner Lemberg <[email protected]>
date: Fri Sep 2 19:27:50 EDT 2016
[sfnt] Avoid left shift of negative value (#48980). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned constant.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2016-09-02 Werner Lemberg <[email protected]>.
+2016-09-02 Werner Lemberg <[email protected]>
+
+ [sfnt] Avoid left shift of negative value (#48980).
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
+ constant.
+
+2016-09-02 Werner Lemberg <[email protected]>
* src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -881,7 +881,7 @@
}
*pwrite++ |= ( ( rval >> nbits ) & 0xFF ) &
- ( ~( 0xFF << w ) << ( 8 - w - x_pos ) );
+ ( ~( 0xFFU << w ) << ( 8 - w - x_pos ) );
rval <<= 8;
w = line_bits - w;