Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Fix for PR bin/48631 - allow commands controlled
details: https://anonhg.NetBSD.org/src/rev/09ce546f02a7
branches: trunk
changeset: 343713:09ce546f02a7
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 22 19:42:46 2016 +0000
description:
Fix for PR bin/48631 - allow commands controlled
by case statements to be nothing more than redirects (from kre)
diffstat:
bin/sh/parser.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 1d31149179cc -r 09ce546f02a7 bin/sh/parser.c
--- a/bin/sh/parser.c Mon Feb 22 19:38:10 2016 +0000
+++ b/bin/sh/parser.c Mon Feb 22 19:42:46 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parser.c,v 1.96 2016/02/22 19:38:10 christos Exp $ */
+/* $NetBSD: parser.c,v 1.97 2016/02/22 19:42:46 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
#else
-__RCSID("$NetBSD: parser.c,v 1.96 2016/02/22 19:38:10 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.97 2016/02/22 19:42:46 christos Exp $");
#endif
#endif /* not lint */
@@ -515,6 +515,12 @@
tokpushback++;
n1 = simplecmd(rpp, redir);
goto checkneg;
+ case TENDCASE:
+ if (redir) {
+ tokpushback++;
+ goto checkneg;
+ }
+ /* FALLTHROUGH */
default:
synexpect(-1);
/* NOTREACHED */
Home |
Main Index |
Thread Index |
Old Index