[gs-cvs] rev 6961 - trunk/gs/src
lpd at ghostscript.com
lpd at ghostscript.com
Fri Aug 4 08:46:35 PDT 2006
Author: lpd
Date: 2006-08-04 08:46:34 -0700 (Fri, 04 Aug 2006)
New Revision: 6961
Modified:
trunk/gs/src/zpacked.c
Log:
Makes packedarray generate stackunderflow rather than rangecheck when given
a too-large positive argument.
Modified: trunk/gs/src/zpacked.c
===================================================================
--- trunk/gs/src/zpacked.c 2006-08-04 15:20:42 UTC (rev 6960)
+++ trunk/gs/src/zpacked.c 2006-08-04 15:46:34 UTC (rev 6961)
@@ -45,11 +45,12 @@
ref parr;
check_type(*op, t_integer);
- if (op->value.intval < 0 ||
- (op->value.intval > op - osbot &&
- op->value.intval >= ref_stack_count(&o_stack))
+ if (op->value.intval < 0)
+ return_error(e_rangecheck);
+ if (op->value.intval > op - osbot &&
+ op->value.intval >= ref_stack_count(&o_stack)
)
- return_error(e_rangecheck);
+ return_error(e_stackunderflow);
osp--;
code = make_packed_array(&parr, &o_stack, (uint) op->value.intval,
idmemory, "packedarray");
More information about the gs-cvs
mailing list