Commit ff1c28f6c01e3068903432cfa157b5a38d015517

Werner Lemberg 2018-07-24T09:59:23

* src/pcf/pcfread.c (pcf_get_encodings): Thinko. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561

diff --git a/ChangeLog b/ChangeLog
index 020575c..d9e5572 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-07-24  Werner Lemberg  <wl@gnu.org>
+
+	* src/pcf/pcfread.c (pcf_get_encodings): Thinko.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
+
 2018-07-22  Werner Lemberg  <wl@gnu.org>
 
 	* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index a3a3dff..5cf2861 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1041,6 +1041,9 @@ THE SOFTWARE.
       FT_TRACE0(( "pcf_get_encodings:"
                   " Invalid default character set to %d\n",
                   face->defaultChar ));
+
+      defaultCharRow = face->defaultChar >> 8;
+      defaultCharCol = face->defaultChar & 0xFF;
     }
 
     /* FreeType mandates that glyph index 0 is the `undefined glyph',  */