[gs-cvs] rev 7030 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Sun Sep 10 15:24:31 PDT 2006
Author: leonardo
Date: 2006-09-10 15:24:31 -0700 (Sun, 10 Sep 2006)
New Revision: 7030
Modified:
trunk/gs/src/zbfont.c
Log:
Fix : pfont->uid.xvalues uses a wrong allocator
DETAILS :
Bug 688883 "pfont->uid.xvalues uses a wrong allocator".
In the old code build_gs_simple_font allocates uid in the current memory,
but few moments later build_gs_sub_font changes the current space to the space
of the font dictionary, and allocates the font structure in it.
The new code allocates the font's uid in same space as the font dictionary.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/zbfont.c
===================================================================
--- trunk/gs/src/zbfont.c 2006-09-10 15:55:10 UTC (rev 7029)
+++ trunk/gs/src/zbfont.c 2006-09-10 22:24:31 UTC (rev 7030)
@@ -455,11 +455,19 @@
gs_uid uid;
int code;
gs_font_base *pfont;
+ uint space = ialloc_space(idmemory);
code = font_bbox_param(imemory, op, bbox);
if (code < 0)
return code;
+ /*
+ * Make sure that we allocate uid
+ * in the same VM as the font dictionary
+ * (see build_gs_sub_font).
+ */
+ ialloc_set_space(idmemory, r_space(op));
code = dict_uid_param(op, &uid, 0, imemory, i_ctx_p);
+ ialloc_set_space(idmemory, space);
if (code < 0)
return code;
if ((options & bf_UniqueID_ignored) && uid_is_UniqueID(&uid))
More information about the gs-cvs
mailing list