From: Jilles Tjoelker <jilles@stack.nl>
To: dash@vger.kernel.org
Subject: [PATCH] [EXPAND] Do not split the result of tilde expansion
Date: Sun, 5 Dec 2010 18:31:59 +0100 [thread overview]
Message-ID: <20101205173159.GA90217@stack.nl> (raw)
A tilde expansion generates a valid pathname. Splitting it using IFS
either leaves it unchanged or changes it to something unintended.
This fixes FreeBSD sh test expansion/tilde1.0 and does not change the
outcome of the other tests.
This fixes Debian bug #601096.
Example:
IFS=m HOME=/tmp; printf "%s\n" ~
---
src/expand.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/expand.c b/src/expand.c
index 1b77b7c..60d4798 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -395,7 +395,6 @@ done:
*p = c;
startloc = expdest - (char *)stackblock();
strtodest(home, SQSYNTAX, quotes);
- recordregion(startloc, expdest - (char *)stackblock(), 0);
return (p);
lose:
*p = c;
--
1.7.3.2
next reply other threads:[~2010-12-05 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-05 17:31 Jilles Tjoelker [this message]
2011-03-10 9:17 ` [PATCH] [EXPAND] Do not split the result of tilde expansion Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101205173159.GA90217@stack.nl \
--to=jilles@stack.nl \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.