[gs-cvs] rev 6962 - trunk/gs/src
lpd at ghostscript.com
lpd at ghostscript.com
Fri Aug 4 09:55:18 PDT 2006
Author: lpd
Date: 2006-08-04 09:55:18 -0700 (Fri, 04 Aug 2006)
New Revision: 6962
Modified:
trunk/gs/src/zarray.c
Log:
Makes the array operator return limitcheck rather than rangecheck if the
requested size is too large.
Modified: trunk/gs/src/zarray.c
===================================================================
--- trunk/gs/src/zarray.c 2006-08-04 15:46:34 UTC (rev 6961)
+++ trunk/gs/src/zarray.c 2006-08-04 16:55:18 UTC (rev 6962)
@@ -31,7 +31,11 @@
uint size;
int code;
- check_int_leu(*op, max_array_size);
+ check_type(*op, t_integer);
+ if (op->value.intval < 0)
+ return_error(e_rangecheck);
+ if (op->value.intval > max_array_size)
+ return_error(e_limitcheck);
size = op->value.intval;
code = ialloc_ref_array((ref *)op, a_all, size, "array");
if (code < 0)
More information about the gs-cvs
mailing list