From 6e1c8399e82c015f4e9d7d67e98d70541a3ef2d0 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 11 Mar 2011 11:07:42 +0800 Subject: [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 Signed-off-by: Herbert Xu --- src/mystring.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mystring.c') diff --git a/src/mystring.c b/src/mystring.c index ce48c82..bbb6b77 100644 --- a/src/mystring.c +++ b/src/mystring.c @@ -62,6 +62,7 @@ const char spcstr[] = " "; const char snlfmt[] = "%s\n"; const char dolatstr[] = { CTLQUOTEMARK, CTLVAR, VSNORMAL, '@', '=', CTLQUOTEMARK, '\0' }; +const char qchars[] = { CTLESC, CTLQUOTEMARK, 0 }; const char illnum[] = "Illegal number: %s"; const char homestr[] = "HOME"; -- cgit 1.4.1