mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Fix a problem with passing quoted strings down to commands.
Reviewed by: Sean Eric Fagan
This commit is contained in:
parent
2355afcfc6
commit
7267a81cea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2266
1 changed files with 6 additions and 3 deletions
|
@ -133,14 +133,17 @@ brk_string(str, store_argc)
|
|||
switch(ch = *p) {
|
||||
case '"':
|
||||
case '\'':
|
||||
if (inquote)
|
||||
if (inquote) {
|
||||
if (inquote == ch)
|
||||
inquote = '\0';
|
||||
else
|
||||
break;
|
||||
else
|
||||
} else {
|
||||
inquote = (char) ch;
|
||||
continue;
|
||||
start = t;
|
||||
continue;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case ' ':
|
||||
case '\t':
|
||||
if (inquote)
|
||||
|
|
Loading…
Reference in a new issue