* Infinite loop with "hash ="
@ 2016-06-07 16:08 Christian Neukirchen
2016-06-07 17:03 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Christian Neukirchen @ 2016-06-07 16:08 UTC (permalink / raw)
To: zsh-workers
Hi,
Just a silly small bug in zsh 5.2 (x86_64-unknown-linux-gnu)
zsh-5.2-0-gc86c20a (and also HEAD 7a5ecf4):
Running "hash =" will trigger an infinite loop, even with the check
currently implemented. (Same for "hash =foo".)
cu,
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Infinite loop with "hash ="
2016-06-07 16:08 Infinite loop with "hash =" Christian Neukirchen
@ 2016-06-07 17:03 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-06-07 17:03 UTC (permalink / raw)
To: zsh-workers
On Jun 7, 6:08pm, Christian Neukirchen wrote:
}
} Running "hash =" will trigger an infinite loop, even with the check
} currently implemented. (Same for "hash =foo".)
Hrmph, that's pretty silly.
diff --git a/Src/builtin.c b/Src/builtin.c
index 6f07fc6..c2fb81e 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3748,6 +3748,7 @@ bin_hash(char *name, char **argv, Options ops, UNUSED(int func))
if (!(asg = getasg(&argv, NULL))) {
zwarnnam(name, "bad assignment");
returnval = 1;
+ break;
} else if (ASG_VALUEP(asg)) {
if(isset(RESTRICTED)) {
zwarnnam(name, "restricted: %s", asg->value.scalar);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-07 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 16:08 Infinite loop with "hash =" Christian Neukirchen
2016-06-07 17:03 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).