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

alexcher at ghostscript.com alexcher at ghostscript.com
Tue Oct 31 09:36:29 PST 2006


Author: alexcher
Date: 2006-10-31 09:36:29 -0800 (Tue, 31 Oct 2006)
New Revision: 7140

Modified:
   trunk/gs/src/zfileio.c
Log:
Change the order of argument checking for readstring operator to satisfy CET
23-21.ps . In general, CET prefers other errors over stack underflow when
there is a choice. Ghostscript was originally designed to do the opposite.


Modified: trunk/gs/src/zfileio.c
===================================================================
--- trunk/gs/src/zfileio.c	2006-10-31 04:29:18 UTC (rev 7139)
+++ trunk/gs/src/zfileio.c	2006-10-31 17:36:29 UTC (rev 7140)
@@ -289,8 +289,8 @@
     uint len, rlen;
     int status;
 
+    check_write_type(*op, t_string);
     check_read_file(s, op - 1);
-    check_write_type(*op, t_string);
     len = r_size(op);
     status = sgets(s, op->value.bytes + start, len - start, &rlen);
     rlen += start;



More information about the gs-cvs mailing list