fix bug with f glob qualifier where an empty spec resulted in an infinite loop

This commit is contained in:
Oliver Kiddle 2003-08-01 14:14:19 +00:00
parent 280593163d
commit 2e70a25d46
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,7 @@
2003-08-01 Oliver Kiddle <opk@zsh.org>
* 189xx: Src/glob.c: fix minor bug with f glob qualifier
* 18xxx: Completion/Unix/Command/_chmod: new chmod completion
2003-08-01 Peter Stephenson <pws@csr.com>

View file

@ -814,7 +814,7 @@ qgetmodespec(char **s)
}
if (how == '=' || how == '-')
no |= val & mask;
} else {
} else if (!(end && c == end) && c != ',' && c) {
t = 07777;
while ((c = *p) == '?' || c == Quest ||
(c >= '0' && c <= '7')) {
@ -838,7 +838,10 @@ qgetmodespec(char **s)
yes |= val;
else
no |= val;
}
} else {
zerr("invalid mode specification", NULL, 0);
return 0;
}
} while (end && c != end);
*s = p;