[gs-cvs] rev 7880 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Tue Apr 24 09:21:22 PDT 2007
Author: leonardo
Date: 2007-04-24 09:21:21 -0700 (Tue, 24 Apr 2007)
New Revision: 7880
Modified:
trunk/gs/src/gstype42.c
Log:
Fix (TT fonts) : Could write past len_glyphs array.
DETAILS :
This is a partial fix for bug 688971
"huge performace problem (with large TT font?)".
Thanks to SaGS for noticing this problem.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/gstype42.c
===================================================================
--- trunk/gs/src/gstype42.c 2007-04-24 00:16:14 UTC (rev 7879)
+++ trunk/gs/src/gstype42.c 2007-04-24 16:21:21 UTC (rev 7880)
@@ -246,7 +246,7 @@
pfont->data.get_metrics = gs_type42_default_get_metrics;
/* Now build the len_glyphs array since 'loca' may not be properly sorted */
- pfont->data.len_glyphs = (uint *)gs_alloc_byte_array(pfont->memory, pfont->data.numGlyphs, sizeof(uint),
+ pfont->data.len_glyphs = (uint *)gs_alloc_byte_array(pfont->memory, loca_size, sizeof(uint),
"gs_type42_font");
if (pfont->data.len_glyphs == 0)
return_error(gs_error_VMerror);
More information about the gs-cvs
mailing list