Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Fix from FreeBSD (applied there in July 2008...)
details: https://anonhg.NetBSD.org/src/rev/ee01542fbe36
branches: trunk
changeset: 824800:ee01542fbe36
user: kre <kre%NetBSD.org@localhost>
date: Mon Jun 19 02:51:51 2017 +0000
description:
Fix from FreeBSD (applied there in July 2008...)
Don't dump core with input like sh -c 'x=; echo >&$x' - that is where
the word after a >& or <& redirect expands to nothing at all.
diffstat:
bin/sh/eval.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 199b8d01f5fb -r ee01542fbe36 bin/sh/eval.c
--- a/bin/sh/eval.c Mon Jun 19 02:49:33 2017 +0000
+++ b/bin/sh/eval.c Mon Jun 19 02:51:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.148 2017/06/17 11:53:24 kre Exp $ */
+/* $NetBSD: eval.c,v 1.149 2017/06/19 02:51:51 kre Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#else
-__RCSID("$NetBSD: eval.c,v 1.148 2017/06/17 11:53:24 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.149 2017/06/19 02:51:51 kre Exp $");
#endif
#endif /* not lint */
@@ -546,7 +546,7 @@
case NFROMFD:
case NTOFD:
if (redir->ndup.vname) {
- expandarg(redir->ndup.vname, &fn, EXP_FULL | EXP_TILDE);
+ expandarg(redir->ndup.vname, &fn, EXP_TILDE | EXP_REDIR);
fixredir(redir, fn.list->text, 1);
}
break;
Home |
Main Index |
Thread Index |
Old Index