ref: aef3fc816b4900a2cb9119e1dcbed339ef5c1590
parent: c2e97a30720c971959bf412e9441a8cfda5dfa16
author: Werner Lemberg <[email protected]>
date: Mon Dec 17 11:21:22 EST 2001
* src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid glyph header.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-17 Werner Lemberg <[email protected]>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid
+ glyph header.
+
2001-12-15 Werner Lemberg <[email protected]>
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove compiler warning.
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1873,6 +1873,7 @@
return result;
}
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error )
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -723,16 +723,6 @@
if ( index < (FT_UInt)face->num_locations - 1 )
count = face->glyph_locations[index + 1] - offset;
- /* temporary hack */
-#if 1
- if ( count < 10 )
- {
- /* This glyph is corrupted -- it does not have a complete header */
- error = TT_Err_Invalid_Outline;
- goto Fail;
- }
-#endif
-
if ( count == 0 )
{
/* as described by Frederic Loyer, these are spaces, and */
@@ -758,6 +748,16 @@
error = TT_Err_Ok;
goto Exit;
}
+
+ /* temporary hack */
+#if 1
+ if ( count < 10 )
+ {
+ /* This glyph is corrupted -- it does not have a complete header */
+ error = TT_Err_Invalid_Outline;
+ goto Fail;
+ }
+#endif
offset = loader->glyf_offset + offset;