This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: wordexp IFS fixes


Ulrich Drepper <drepper@cygnus.com> writes:

|> Tim Waugh <tim@cyberelk.demon.co.uk> writes:
|> 
|> > If IFS=':', how many words would you expect ":abc:" to expand to?  
|> > wordexp currently says 1 ("abc"), which is certainly wrong; bash seems to
|> > say 2 ("" and "abc"), and the spec (or what I have of it) would seem to
|> > say 3 ("", "abc", and "").  I expect that I've misread the spec..
|> 
|> We don't have many comparisons available.  All systems I've tried
|> (Solaris, DU, Irix) completely fail to recognize IFS.  Loosers.

Did you try this:

	IFS=:; set :abc:

or this:

	IFS=:; foo=:abc:; set $foo
?
Note that IFS splitting only occurs when any expansion is done at all.
This closes a well known sh security bug.

Andreas.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]