[gs-cvs] rev 7000 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Fri Aug 18 03:34:25 PDT 2006


Author: leonardo
Date: 2006-08-18 03:34:25 -0700 (Fri, 18 Aug 2006)
New Revision: 7000

Modified:
   trunk/gs/src/gdevpdtt.c
Log:
Fix (pdfwrite) : Quiet the heal validation procedure.

DETAILS :

See comment in code.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gdevpdtt.c
===================================================================
--- trunk/gs/src/gdevpdtt.c	2006-08-18 07:56:59 UTC (rev 6999)
+++ trunk/gs/src/gdevpdtt.c	2006-08-18 10:34:25 UTC (rev 7000)
@@ -447,8 +447,18 @@
 				"pdf_remove_font_cache_elem");
 	    gs_free_object(pdev->pdf_memory, e0->real_widths, 
 				"pdf_remove_font_cache_elem");
+	    /* Clean pointers, because gs_free_object below may work idle
+	       when this function is called by a garbager notification.
+	       Leaving unclean pointers may cause 
+	       a further heap validation to fail
+	       since the unfreed structure points to freed areas.
+	       For instance, e0->next may point to an element, 
+	       which is really freed with a subsequent 'restore'.
+	       Bug 688837. */
+	    e0->next = 0;
 	    e0->glyph_usage = 0;
 	    e0->real_widths = 0;
+	    e0->pdev = 0;
 	    gs_free_object(pdev->pdf_memory, e0, 
 				"pdf_remove_font_cache_elem");
 	    return;



More information about the gs-cvs mailing list