summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-07-26 23:14:53 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-07-26 23:14:53 +0000
commit9fa36eb30c7228306e794b48de0cad0797d17ee8 (patch)
treecdfe55341f002fbcd96d6f9e0f29aa462d5199eb
parentc05f7d0df196b68dc133e9d56e6d690c9a1e5ca8 (diff)
downloadpango-9fa36eb30c7228306e794b48de0cad0797d17ee8.tar.gz
Fix allocation and indexing in NewGlyphClasses array. (#130661, Masatake
Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com> * pango/opentype/ftxgdef.c: Fix allocation and indexing in NewGlyphClasses array. (#130661, Masatake YAMATO)
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-1-105
-rw-r--r--ChangeLog.pre-1-65
-rw-r--r--ChangeLog.pre-1-85
-rw-r--r--pango/opentype/ftxgdef.c14
5 files changed, 27 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 816453ce..78888706 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Fix allocation and indexing
+ in NewGlyphClasses array. (#130661, Masatake YAMATO)
+
Mon Jul 26 15:55:03 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-font.c (get_glyph_extents_missing):
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 816453ce..78888706 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,8 @@
+Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Fix allocation and indexing
+ in NewGlyphClasses array. (#130661, Masatake YAMATO)
+
Mon Jul 26 15:55:03 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-font.c (get_glyph_extents_missing):
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 816453ce..78888706 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,8 @@
+Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Fix allocation and indexing
+ in NewGlyphClasses array. (#130661, Masatake YAMATO)
+
Mon Jul 26 15:55:03 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-font.c (get_glyph_extents_missing):
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 816453ce..78888706 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,8 @@
+Mon Jul 26 19:11:46 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c: Fix allocation and indexing
+ in NewGlyphClasses array. (#130661, Masatake YAMATO)
+
Mon Jul 26 15:55:03 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-font.c (get_glyph_extents_missing):
diff --git a/pango/opentype/ftxgdef.c b/pango/opentype/ftxgdef.c
index a31bcc84..449b2e2d 100644
--- a/pango/opentype/ftxgdef.c
+++ b/pango/opentype/ftxgdef.c
@@ -773,7 +773,7 @@
glyph_index = glyphID - gcrr[index].End - 1;
}
- byte = ngc[array_index][glyph_index / 4 + 1];
+ byte = ngc[array_index][glyph_index / 4];
bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 );
return bits & 0x000F;
@@ -1010,7 +1010,7 @@
if ( gcrr[0].Start )
{
- if ( ALLOC_ARRAY( ngc[0], gcrr[0].Start / 4 + 1, FT_UShort ) )
+ if ( ALLOC_ARRAY( ngc[0], ( gcrr[0].Start + 3 ) / 4, FT_UShort ) )
goto Fail1;
}
@@ -1018,7 +1018,7 @@
{
if ( gcrr[n].Start - gcrr[n - 1].End > 1 )
if ( ALLOC_ARRAY( ngc[n],
- ( gcrr[n].Start - gcrr[n - 1].End - 1 ) / 4 + 1,
+ ( gcrr[n].Start - gcrr[n - 1].End + 2 ) / 4,
FT_UShort ) )
goto Fail1;
}
@@ -1026,7 +1026,7 @@
if ( gcrr[count - 1].End != num_glyphs - 1 )
{
if ( ALLOC_ARRAY( ngc[count],
- ( num_glyphs - gcrr[count - 1].End - 1 ) / 4 + 1,
+ ( num_glyphs - gcrr[count - 1].End + 2 ) / 4,
FT_UShort ) )
goto Fail1;
}
@@ -1141,7 +1141,7 @@
glyph_index = glyphID - gcrr[index].End - 1;
}
- byte = ngc[array_index][glyph_index / 4 + 1];
+ byte = ngc[array_index][glyph_index / 4];
bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 );
class = bits & 0x000F;
@@ -1152,8 +1152,8 @@
bits = new_class << ( 16 - ( glyph_index % 4 + 1 ) * 4 );
mask = ~( 0x000F << ( 16 - ( glyph_index % 4 + 1 ) * 4 ) );
- ngc[array_index][glyph_index / 4 + 1] &= mask;
- ngc[array_index][glyph_index / 4 + 1] |= bits;
+ ngc[array_index][glyph_index / 4] &= mask;
+ ngc[array_index][glyph_index / 4] |= bits;
}
return TT_Err_Ok;