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

alexcher at ghostscript.com alexcher at ghostscript.com
Sun Mar 25 07:48:20 PDT 2007


Author: alexcher
Date: 2007-03-25 07:48:19 -0700 (Sun, 25 Mar 2007)
New Revision: 7800

Modified:
   trunk/gs/src/gxfcopy.c
Log:
Fix an off-by-one error in the glyph array sorting logic detected by Purify.

DIFFERENCES:
No CET or Comparefiles differences.


Modified: trunk/gs/src/gxfcopy.c
===================================================================
--- trunk/gs/src/gxfcopy.c	2007-03-25 06:48:56 UTC (rev 7799)
+++ trunk/gs/src/gxfcopy.c	2007-03-25 14:48:19 UTC (rev 7800)
@@ -2394,7 +2394,7 @@
 	}
     }
     qsort(a, cfdata->num_glyphs, sizeof(*a), compare_glyph_names);
-    for (; j >= 0; j--)
+    for (j--; j >= 0; j--)
 	cfdata->glyphs[j].order_index = a[j] - cfdata->names;    
     gs_free_object(memory, a, "order_font_data");
     return 0;



More information about the gs-cvs mailing list