diff options
author | Dmitrij Czarkoff <czarkoff@cvs.openbsd.org> | 2016-03-04 09:37:24 +0000 |
---|---|---|
committer | Dmitrij Czarkoff <czarkoff@cvs.openbsd.org> | 2016-03-04 09:37:24 +0000 |
commit | 8ba29e461549abf45561c21f5869c5cd106ac7fa (patch) | |
tree | a8a243b0b1d594fcb2fb382875081bbb379de98d /bin/ksh | |
parent | 0d943e2187d60efcf2c0cca6074b08bd663702f0 (diff) |
don't parse (...|...) patterns in variable substitution inside double quotes
fixes posix compatibility issue
OK millert@, nicm@, otto@
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/lex.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c index 568a960c06c..73c54b3af37 100644 --- a/bin/ksh/lex.c +++ b/bin/ksh/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.67 2015/12/30 09:07:00 tedu Exp $ */ +/* $OpenBSD: lex.c,v 1.68 2016/03/04 09:37:23 czarkoff Exp $ */ /* * lexical analysis and source input @@ -582,6 +582,15 @@ yylex(int cf) break; case SBRACEQ: + /*{*/ + if (c == '}') { + POP_STATE(); + *wp++ = CSUBST; + *wp++ = /*{*/ '}'; + } else + goto Sbase2; + break; + case SBRACE: /*{*/ if (c == '}') { |