shithub: freetype+ttf2subf

Download patch

ref: 03b0cc2ea9b63f57ec58f77d8cc1350691d7140a
parent: 47a03e9b2366bba091bc21d011ab60782538243a
author: Werner Lemberg <[email protected]>
date: Fri Jun 2 05:16:52 EDT 2017

[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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2017-06-02  Werner Lemberg  <[email protected]>
 
+	[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  <[email protected]>
+
 	[bdf] Fix integer scanning routines.
 
 	Reported as
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -455,11 +455,11 @@
           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 )