[HarfBuzz] harfbuzz: Branch 'master' - 2 commits
Simon Hausmann
hausmann at kemper.freedesktop.org
Sun Aug 26 05:59:13 PDT 2007
src/harfbuzz-gpos.c | 15 ++++++++++-----
src/harfbuzz-gsub.c | 2 +-
2 files changed, 11 insertions(+), 6 deletions(-)
New commits:
diff-tree 5cfa46348bb789b80d3bb2c6bf1eba915c9a5a10 (from parents)
Merge: 5ae52c37acc729d7927d003170de8dcfb8d951cf 1648645611842a8a61d627a153fba0dc20306f95
Author: Simon Hausmann <shausman at trolltech.com>
Date: Sun Aug 26 14:46:41 2007 +0200
Merge branch 'stable'
Conflicts:
src/harfbuzz-gpos.c
src/harfbuzz-gsub.c
diff --cc src/harfbuzz-gpos.c
index 2e3c211,6f0476a..8da4540
@@@ -1458,16 -1515,16 +1458,16 @@@
}
-static FT_Error Lookup_PairPos1( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos1( GPOS_Instance* gpi,
HB_PairPosFormat1* ppf1,
HB_Buffer buffer,
- HB_UShort first_pos,
- FT_ULong first_pos,
- FT_UShort index,
- FT_UShort format1,
- FT_UShort format2 )
++ HB_UInt first_pos,
+ HB_UShort index,
+ HB_UShort format1,
+ HB_UShort format2 )
{
- FT_Error error;
- FT_UShort numpvr, glyph2;
+ HB_Error error;
+ HB_UShort numpvr, glyph2;
HB_PairValueRecord* pvr;
@@@ -1500,15 -1557,15 +1500,15 @@@
}
-static FT_Error Lookup_PairPos2( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos2( GPOS_Instance* gpi,
HB_PairPosFormat2* ppf2,
HB_Buffer buffer,
- HB_UShort first_pos,
- FT_ULong first_pos,
- FT_UShort format1,
- FT_UShort format2 )
++ HB_UInt first_pos,
+ HB_UShort format1,
+ HB_UShort format2 )
{
- FT_Error error;
- FT_UShort cl1, cl2;
+ HB_Error error;
+ HB_UShort cl1, cl2;
HB_Class1Record* c1r;
HB_Class2Record* c2r;
@@@ -1535,15 -1592,16 +1535,16 @@@
}
-static FT_Error Lookup_PairPos( GPOS_Instance* gpi,
+static HB_Error Lookup_PairPos( GPOS_Instance* gpi,
HB_GPOS_SubTable* st,
HB_Buffer buffer,
- FT_UShort flags,
- FT_UShort context_length,
+ HB_UShort flags,
+ HB_UShort context_length,
int nesting_level )
{
- FT_Error error;
- FT_UShort index, property;
- FT_ULong first_pos;
+ HB_Error error;
- HB_UShort index, property, first_pos;
++ HB_UShort index, property;
++ HB_UInt first_pos;
HB_GPOSHeader* gpos = gpi->gpos;
HB_PairPos* pp = &st->pair;
@@@ -3063,8 -3141,8 +3068,8 @@@
HB_Buffer buffer,
int nesting_level )
{
- FT_Error error;
- FT_ULong i, old_pos;
+ HB_Error error;
- HB_UShort i, old_pos;
++ HB_UInt i, old_pos;
i = 0;
diff --cc src/harfbuzz-gsub.c
index 427385c,d079f9f..5cdd801
@@@ -1088,8 -1129,8 +1088,8 @@@
HB_Buffer buffer,
int nesting_level )
{
- FT_Error error;
- FT_ULong i, old_pos;
+ HB_Error error;
- HB_UShort i, old_pos;
++ HB_UInt i, old_pos;
i = 0;
diff-tree 1648645611842a8a61d627a153fba0dc20306f95 (from e0985c2deaf9af22a91e4b809459ab842ad7d85a)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Aug 26 14:43:27 2007 +0200
[HarfBuzz] Another fix
The actual fix for this bug now:
        http://bugzilla.gnome.org/show_bug.cgi?id=463430
The bug was that an intermediate index variable was of type FT_UShort
and overflowing with more than 65536 input glyphs. Â Yikes! Â Patch
attached.
diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c
index 513f3fb..6f0476a 100644
--- a/src/harfbuzz-gpos.c
+++ b/src/harfbuzz-gpos.c
@@ -1518,7 +1518,7 @@ static void Free_PairPos( HB_GPOS_SubTa
static FT_Error Lookup_PairPos1( GPOS_Instance* gpi,
HB_PairPosFormat1* ppf1,
HB_Buffer buffer,
- FT_UShort first_pos,
+ FT_ULong first_pos,
FT_UShort index,
FT_UShort format1,
FT_UShort format2 )
@@ -1560,7 +1560,7 @@ static FT_Error Lookup_PairPos1( GPOS_I
static FT_Error Lookup_PairPos2( GPOS_Instance* gpi,
HB_PairPosFormat2* ppf2,
HB_Buffer buffer,
- FT_UShort first_pos,
+ FT_ULong first_pos,
FT_UShort format1,
FT_UShort format2 )
{
@@ -1600,7 +1600,8 @@ static FT_Error Lookup_PairPos( GPOS_In
int nesting_level )
{
FT_Error error;
- FT_UShort index, property, first_pos;
+ FT_UShort index, property;
+ FT_ULong first_pos;
HB_GPOSHeader* gpos = gpi->gpos;
HB_PairPos* pp = &st->pair;
@@ -1631,8 +1632,12 @@ static FT_Error Lookup_PairPos( GPOS_In
return error;
if ( buffer->in_pos == buffer->in_length )
- return HB_Err_Not_Covered;
+ {
+ buffer->in_pos = first_pos;
+ return HB_Err_Not_Covered;
+ }
(buffer->in_pos)++;
+
}
switch ( pp->PosFormat )
@@ -3137,7 +3142,7 @@ static FT_Error Do_ContextPos( GPOS_Ins
int nesting_level )
{
FT_Error error;
- FT_UShort i, old_pos;
+ FT_ULong i, old_pos;
i = 0;
diff --git a/src/harfbuzz-gsub.c b/src/harfbuzz-gsub.c
index 1d91a11..d079f9f 100644
--- a/src/harfbuzz-gsub.c
+++ b/src/harfbuzz-gsub.c
@@ -1130,7 +1130,7 @@ static FT_Error Do_ContextSubst( HB_GSU
int nesting_level )
{
FT_Error error;
- FT_UShort i, old_pos;
+ FT_ULong i, old_pos;
i = 0;
More information about the HarfBuzz
mailing list