ref: f4a52a6c422a190be6d2b04d15e89cd2c627b2aa
parent: c81cf61fcfdd17c55cd97563391f01215ab5bb2e
author: Werner Lemberg <[email protected]>
date: Mon Apr 9 04:40:11 EDT 2007
* src/truetype/ttgload.c (load_truetype_glyph): Save and restore memory stream to avoid a crash with the incremental memory interface (Savannah bug #19260).
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-09 Martin Horak <[email protected]>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Save and restore
+ memory stream to avoid a crash with the incremental memory
+ interface (Savannah bug #19260).
+
2007-04-06 David Turner <[email protected]>
* src/base/ftbimap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1377,7 +1377,9 @@
FT_UInt num_subglyphs = gloader->current.num_subglyphs;
FT_UInt num_base_subgs = gloader->base.num_subglyphs;
+ FT_Stream old_stream = loader->stream;
+
FT_GlyphLoader_Add( gloader );
/* read each subglyph independently */
@@ -1430,6 +1432,7 @@
num_base_points );
}
+ loader->stream = old_stream;
/* process the glyph */
loader->ins_pos = ins_pos;