Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Fixed potential crash resulting from bad hash -d.



On #zsh, Mikael pointed out that "hash -d fail\\=/tmp" crashes the shell. This patch fixes bad behavior by hash -d if the left hand side of an assignment contains invalid characters.

Michael Hwang

---
 Src/builtin.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Src/builtin.c b/Src/builtin.c
index 1eca820..2a02c9a 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3348,7 +3348,6 @@ bin_hash(char *name, char **argv, Options ops, UNUSED(int func))
 				 "invalid character in directory name: %s",
 				 asg->name);
 			returnval = 1;
-			argv++;
 			continue;
 		    } else {
 			Nameddir nd = hn = zshcalloc(sizeof *nd);
-- 
1.6.2.5



Messages sorted by: Reverse Date, Date, Thread, Author