projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0e70af
)
ash: fix segfault in ash.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 16 Oct 2006 01:33:16 +0000
(
01:33
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 16 Oct 2006 01:33:16 +0000
(
01:33
-0000)
patch by walter harms <wharms@bfs.de>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 1260d5e9a0900d986c725cd9bf27f6e270c9509c..a34c871f140b4ff0ead597693a705061a41fbcd6 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-3042,6
+3042,7
@@
expredir(union node *n)
for (redir = n ; redir ; redir = redir->nfile.next) {
struct arglist fn;
+ memset(&fn, 0, sizeof(struct arglist));
fn.lastp = &fn.list;
switch (redir->type) {
case NFROMTO:
@@
-3056,7
+3057,10
@@
expredir(union node *n)
case NTOFD:
if (redir->ndup.vname) {
expandarg(redir->ndup.vname, &fn, EXP_FULL | EXP_TILDE);
- fixredir(redir, fn.list->text, 1);
+ if (fn.list != NULL)
+ fixredir(redir, fn.list->text, 1);
+ else
+ sh_error("redir error");
}
break;
}