diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-07-08 00:33:45 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-07-08 00:33:45 +0000 |
commit | d8aee674929b7579e9c4c2b51cb83ed1006eec8f (patch) | |
tree | 67796d5e3dd755bc149a6775061afc511ca2e085 /Src | |
parent | 22faf1fa4b1290f5f7f7389bbef33acc2fcdce05 (diff) | |
download | zsh-d8aee674929b7579e9c4c2b51cb83ed1006eec8f.tar.gz zsh-d8aee674929b7579e9c4c2b51cb83ed1006eec8f.tar.xz zsh-d8aee674929b7579e9c4c2b51cb83ed1006eec8f.zip |
Fix infinite loop on `r OLD=NEW' when OLD is the empty string.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 110a264f2..11324a0cd 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1250,6 +1250,10 @@ bin_fc(char *nam, char **argv, char *ops, int func) while (*argv && equalsplit(*argv, &s)) { Asgment a = (Asgment) zhalloc(sizeof *a); + if (!**argv) { + zwarnnam(nam, "invalid replacement pattern: =%s", s, 0); + return 1; + } if (!asgf) asgf = asgl = a; else { |