Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Fixed potential crash resulting from bad hash -d.
- X-seq: zsh-workers 27675
- From: Michael Hwang <michael.a.hwang@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Fixed potential crash resulting from bad hash -d.
- Date: Fri, 5 Feb 2010 23:52:39 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:x-mailer; bh=51zA5dttKaAUkfPwUQ6fdFhQ5sThil6UnJxU1p3Er1A=; b=i0/mSmBtqReb5uMHDW4HXYaYuqLwXcCGb0/MPA2R0alwdKXd7EPduI4Ex/TCH36Rkd EMoFS9HqU52AbRSZqZ5tfPao+SW6j+FiaD0o8fZw6NjmYBQwp2f9nmH2MasXyWzA0apo Q6MJiXI767lusWHHeL9VKUlyQd4/mhajAutds=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; b=p03lPQKqLvi9oMNWl1gB8uBcIFjhbbWksYPBjTF4hJ8abhZ3DGo9uANKRfPHf3jh8g 4H4LsSbRCbG4gZqlAC40DT5gkwHJCWsf8vvb5jgKmMtSJpQrizC6wmPmySOZ3K3A/QU0 wFs+PHUf9d+QMusAcoTpoxGs83e+60zT4uV5w=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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