ref: 23a424f521570239f666e83289a90f05416a9cab
parent: 4fc0ccea68810cc0e488f92edf7f538bd30fbbb3
author: Werner Lemberg <[email protected]>
date: Fri Aug 17 16:16:44 EDT 2007
* src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of SingleSubstFormat1.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-17 George Williams <[email protected]>
+
+ * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of
+ SingleSubstFormat1.
+
2007-08-11 suzuki toshiya <[email protected]>
* builds/unix/configure.raw: Fix a bug which sets CC_BUILD by
--- a/src/otvalid/otvgsub.c
+++ b/src/otvalid/otvgsub.c
@@ -71,16 +71,12 @@
otv_Coverage_validate( Coverage, valid, -1 );
idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID;
- if ( idx < 0 ||
- idx + DeltaGlyphID < 0 ||
- (FT_UInt)idx + DeltaGlyphID >= valid->glyph_count )
- FT_INVALID_GLYPH_ID;
+ if ( idx < 0 )
+ FT_INVALID_DATA;
idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID;
- if ( (FT_UInt)idx >= valid->glyph_count ||
- idx + DeltaGlyphID < 0 ||
- (FT_UInt)idx + DeltaGlyphID >= valid->glyph_count )
- FT_INVALID_GLYPH_ID;
+ if ( (FT_UInt)idx >= valid->glyph_count )
+ FT_INVALID_DATA;
}
break;