diff --git a/ChangeLog b/ChangeLog index 618700dd0..ae817b9cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-29 Werner Lemberg + + [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 [truetype] Make SHC instruction behave similar to MS rasterizer. diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index f35521e17..fb801d0ea 100644 --- 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; @@ -439,6 +431,8 @@ p += n_ins; + outline = &gloader->current.outline; + /* reading the point tags */ flag = (FT_Byte*)outline->tags; flag_limit = flag + n_points;