diff options
author | jilles <jilles@FreeBSD.org> | 2013-07-23 21:09:26 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-07-23 21:09:26 +0000 |
commit | bc9fec6137dec23cc035c0794e79ca2d9a6d7ef5 (patch) | |
tree | 34578f391a992e930f2d23ddeacef4dfb22d1dff /lib | |
parent | 5cb590fc37a5c65062a909bd466e3e341f267f99 (diff) | |
download | FreeBSD-src-bc9fec6137dec23cc035c0794e79ca2d9a6d7ef5.zip FreeBSD-src-bc9fec6137dec23cc035c0794e79ca2d9a6d7ef5.tar.gz |
wordexp(): Fix syntax validation for backslashes in single-quotes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/wordexp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/wordexp.c b/lib/libc/gen/wordexp.c index 7d8b8f9..c361980 100644 --- a/lib/libc/gen/wordexp.c +++ b/lib/libc/gen/wordexp.c @@ -251,7 +251,8 @@ we_check(const char *words, int flags) while ((c = *words++) != '\0') { switch (c) { case '\\': - quote ^= 1; + if (squote == 0) + quote ^= 1; continue; case '\'': if (quote + dquote == 0) |