[gs-cvs] rev 6942 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Tue Aug 1 11:52:58 PDT 2006
Author: alexcher
Date: 2006-08-01 11:52:57 -0700 (Tue, 01 Aug 2006)
New Revision: 6942
Modified:
trunk/gs/src/zgeneric.c
Log:
Make copy operator error reprorting similar to Distiller's.
Modified: trunk/gs/src/zgeneric.c
===================================================================
--- trunk/gs/src/zgeneric.c 2006-08-01 16:55:54 UTC (rev 6941)
+++ trunk/gs/src/zgeneric.c 2006-08-01 18:52:57 UTC (rev 6942)
@@ -71,9 +71,12 @@
int count, i;
int code;
- if ((ulong) op->value.intval > op - osbot) {
+ if ((ulong) op->value.intval > (ulong)(op - osbot)) {
/* There might be enough elements in other blocks. */
- check_int_ltu(*op, ref_stack_count(&o_stack));
+ check_type(*op, t_integer);
+ if ((ulong)op->value.intval >= ref_stack_count(&o_stack))
+ return_error(e_stackunderflow);
+ check_int_ltu(*op, ref_stack_count(&o_stack));
count = op->value.intval;
} else if (op1 + (count = op->value.intval) <= ostop) {
/* Fast case. */
@@ -591,7 +594,7 @@
{ /* We don't have to worry about aliasing, because */
/* packed arrays are read-only and hence the destination */
/* can't be a packed array. */
- int i;
+ uint i;
const ref_packed *packed = prfrom->value.packed;
ref *pdest = prto->value.refs + index;
ref elt;
More information about the gs-cvs
mailing list