shithub: freetype+ttf2subf

Download patch

ref: 3037b069f8574be3841c9f9d9ca5701e2dce881d
parent: c28b8c1bfbddb176b8fd6d2c1a55814476c34501
author: Werner Lemberg <[email protected]>
date: Sat Jun 26 03:03:53 EDT 2004

* src/type1/t1afm.c (afm_atoindex): Fix boundary test.  Reported
by Dirck Blaskey.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-25  Werner Lemberg  <[email protected]>
+
+	* src/type1/t1afm.c (afm_atoindex): Fix boundary test.  Reported
+	by Dirck Blaskey.
+
 2004-06-24  David Turner  <[email protected]>
 
         * src/truetype/ttgload.c, src/truetype/ttxgvar.c: removing
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM support for Type 1 fonts (body).                                 */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
+/*  Copyright 1996-2001, 2002, 2003, 2004 by                               */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -63,13 +63,13 @@
 
 
     /* skip whitespace */
-    while ( ( *p == ' ' || *p == '\t' || *p == ':' || *p == ';' ) &&
-            p < limit                                             )
+    while ( p < limit                                             &&
+            ( *p == ' ' || *p == '\t' || *p == ':' || *p == ';' ) )
       p++;
     *start = p;
 
     /* now, read glyph name */
-    while ( IS_ALPHANUM( *p ) && p < limit )
+    while ( p < limit && IS_ALPHANUM( *p ) )
       p++;
 
     len = p - *start;