1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00

Added some array-assignment boundary checks.

This commit is contained in:
Wayne Davison 2001-05-20 09:20:46 +00:00
parent 6ea2dab092
commit 792135ba0b

@ -1727,8 +1727,13 @@ setarrvalue(Value v, char **val)
v->pm->nam, 0);
return;
}
if (v->inv && unset(KSHARRAYS))
v->start--, v->end--;
if (v->inv && unset(KSHARRAYS)) {
if (v->start > 0)
v->start--;
v->end--;
}
if (v->end < v->start)
v->end = v->start;
q = old = v->pm->gets.afn(v->pm);
n = arrlen(old);
if (v->start < 0) {