From 6a2e7e1fc6dfd12ab4605b020c584ec58ac7eca0 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 7 Dec 2011 09:13:23 -0500 Subject: [PATCH] commit bash-20070927 snapshot --- CWRU/CWRU.chlog | 14 ++++++++++++++ pathexp.c | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 292ac7fa0..e868b9018 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -14900,3 +14900,17 @@ builtins/common.c - add code to retry fork() after EAGAIN, with a progressively longer sleep between attempts, up to FORKSLEEP_MAX (16) seconds. Suggested by Martin Koeppe + + 9/21 + ---- +version.c + - change copyright year to 2007 + + 9/25 + ---- +pathexp.c + - change quote_string_for_globbing to add a backslash in front of a + backslash appearing in the pathname string, since the globbing + code will interpret backslashes as quoting characters internally. + Bug reported by on the debian list + (443685) diff --git a/pathexp.c b/pathexp.c index 69966ac43..b2305e038 100644 --- a/pathexp.c +++ b/pathexp.c @@ -176,6 +176,13 @@ quote_string_for_globbing (pathname, qflags) if (pathname[i] == '\0') break; } + else if (pathname[i] == '\\') + { + temp[j++] = '\\'; + i++; + if (pathname[i] == '\0') + break; + } temp[j++] = pathname[i]; } temp[j] = '\0'; -- 2.47.3