ref: 9290fa9022c29c616ea783dc1028aad1ea92f2ee
parent: 9eacbb81bd4823f185d1b1a3f188b3d82a325ff0
author: Werner Lemberg <[email protected]>
date: Wed Feb 29 12:29:07 EST 2012
[truetype] Remove redundant check. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove reduntant second check for ordered contour start points.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2012-02-29 Werner Lemberg <[email protected]>
+ [truetype] Remove redundant check.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove reduntant
+ second check for ordered contour start points.
+
+2012-02-29 Werner Lemberg <[email protected]>
+
[truetype] Make SHC instruction behave similar to MS rasterizer.
* src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
-/* Copyright 1996-2011 */
+/* Copyright 1996-2012 */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -373,8 +373,7 @@
if ( cont[0] <= prev_cont )
{
/* unordered contours: this is invalid */
- error = TT_Err_Invalid_Table;
- goto Fail;
+ goto Invalid_Outline;
}
prev_cont = cont[0];
}
@@ -392,13 +391,6 @@
if ( error )
goto Fail;
- /* we'd better check the contours table right now */
- outline = &gloader->current.outline;
-
- for ( cont = outline->contours + 1; cont < cont_limit; cont++ )
- if ( cont[-1] >= cont[0] )
- goto Invalid_Outline;
-
/* reading the bytecode instructions */
load->glyph->control_len = 0;
load->glyph->control_data = 0;
@@ -438,6 +430,8 @@
#endif /* TT_USE_BYTECODE_INTERPRETER */
p += n_ins;
+
+ outline = &gloader->current.outline;
/* reading the point tags */
flag = (FT_Byte*)outline->tags;