[bdf] Don't left-shift negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/ChangeLog b/ChangeLog
index 6d921ba..6194a2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2017-06-02 Werner Lemberg <wl@gnu.org>
+ [bdf] Don't left-shift negative numbers.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
+
+2017-06-02 Werner Lemberg <wl@gnu.org>
+
[bdf] Fix integer scanning routines.
Reported as
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index c0a5a5c..540d367 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -455,11 +455,11 @@ THE SOFTWARE.
bsize->size =
(FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L );
else
- bsize->size = bsize->width << 6;
+ bsize->size = bsize->width * 64;
prop = bdf_get_font_property( font, "PIXEL_SIZE" );
if ( prop )
- bsize->y_ppem = (FT_Short)prop->value.l << 6;
+ bsize->y_ppem = (FT_Short)prop->value.l * 64;
prop = bdf_get_font_property( font, "RESOLUTION_X" );
if ( prop )