Module Name:    src
Committed By:   christos
Date:           Sun Mar 25 18:49:14 UTC 2012

Modified Files:
        src/bin/sh: parser.c

Log Message:
PR/43597: Don't break from parsing word tokens in we are in double quotes.
Fixes: sh -c 'echo "${foo:="first-word"} second-word"'


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/bin/sh/parser.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.80 src/bin/sh/parser.c:1.81
--- src/bin/sh/parser.c:1.80	Wed Aug 31 12:24:55 2011
+++ src/bin/sh/parser.c	Sun Mar 25 14:49:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $	*/
+/*	$NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 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.80 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -1108,7 +1108,7 @@ readtoken1(int firstc, char const *syn, 
 			case CEOF:
 				goto endword;		/* exit outer loop */
 			default:
-				if (varnest == 0)
+				if (varnest == 0 && !ISDBLQUOTE())
 					goto endword;	/* exit outer loop */
 				USTPUTC(c, out);
 			}

Reply via email to