summary refs log tree commit diff
path: root/src/expand.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2011-03-11 11:07:42 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2011-03-11 11:07:42 +0800
commit6e1c8399e82c015f4e9d7d67e98d70541a3ef2d0 (patch)
tree3f0360309fb374bca544a4527f4f63897a8a0418 /src/expand.c
parent[BUILTIN] Dotcmd should exit with zero when doing nothing (diff)
downloaddash-6e1c8399e82c015f4e9d7d67e98d70541a3ef2d0.tar.gz
dash-6e1c8399e82c015f4e9d7d67e98d70541a3ef2d0.zip
[BUILTIN] Fix backslash handling in read(1)
The new read(1) implementation incorrectly assumes that ifsbreakup
ignores characters escaped by CTLESC.  As such it fails to handle
backslashes except for escaping newlines.

This patch makes it use recordregion for every part that isn't
escaped by a backslash.

Reported-by: Jilles Tjoelker <jilles@stack.nl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/expand.c')
-rw-r--r--src/expand.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/expand.c b/src/expand.c
index 6bee5c5..7a9b157 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -1597,7 +1597,6 @@ char *
 _rmescapes(char *str, int flag)
 {
 	char *p, *q, *r;
-	static const char qchars[] = { CTLESC, CTLQUOTEMARK, 0 };
 	unsigned inquotes;
 	int notescaped;
 	int globbing;