about summary refs log tree commit diff
path: root/Src/params.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-04-25 09:31:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-04-25 09:31:57 +0000
commitc335b7f0a11d8af8035fc49a743d9dea92766342 (patch)
tree0f4a7b6882a5c1e896401116c010b0c1a8eca972 /Src/params.c
parent3e05817b7758defc008ce240235cf3174a88d4f3 (diff)
downloadzsh-c335b7f0a11d8af8035fc49a743d9dea92766342.tar.gz
zsh-c335b7f0a11d8af8035fc49a743d9dea92766342.tar.xz
zsh-c335b7f0a11d8af8035fc49a743d9dea92766342.zip
30455: remove max array length test
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/params.c b/Src/params.c
index 24062e03a..966e3afcc 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1905,6 +1905,18 @@ fetchvalue(Value v, char **pptr, int bracks, int flags)
     if (!bracks && *s)
 	return NULL;
     *pptr = s;
+#if 0
+    /*
+     * Check for large subscripts that might be erroneous.
+     * This code is too gross in several ways:
+     * - the limit is completely arbitrary
+     * - the test vetoes operations on existing arrays
+     * - it's not at all clear a general test on large arrays of
+     *   this kind is any use.
+     *
+     * Until someone comes up with workable replacement code it's
+     * therefore commented out.
+     */
     if (v->start > MAX_ARRLEN) {
 	zerr("subscript too %s: %d", "big", v->start + !isset(KSHARRAYS));
 	return NULL;
@@ -1921,6 +1933,7 @@ fetchvalue(Value v, char **pptr, int bracks, int flags)
 	zerr("subscript too %s: %d", "small", v->end);
 	return NULL;
     }
+#endif
     return v;
 }