Re: Possible regression in Dash v0.5.10 on OSX / home-brew

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robbie Gates <rgates@xxxxxxxxxxxxx> wrote:
> Hi All,
> 
> I hope this is the right place to report this:
> 
> It looks like something is up with processing of certain characters
> inside quoted strings when --enable-fnmatch --enable-glob are enabled,
> as they are in the homebrew installation of dash on OSX:
> 
>  ( git checkout v0.5.10 && git clean -dfx && ./autogen.sh &&
> ./configure --enable-fnmatch --enable-glob && make && ./src/dash -c
> "printf '%s\n' 'a/?*[/b'" ) 2>/dev/null | tail -1
> 
> produces
> 
>  a\/\?\*\[\/b\n
> 
> with no terminating newline. I believe that dash is adding an extra
> backslash in front of some special characters inside quoted strings.
> The \n and missing newline above is because dash is doubling the
> backslash, so printf is then seeing \\n, printing \ and n (and no
> newline). This theory is backed up by switching out printf for a
> simple c program which just dumps argv to stdout.
> 
> The behaviour is present on master for me, at git commit
> 03cbaba30d7f6e4f89b6e881b6b909cb45924025

Thanks for the report.  I presume this is the result of

commit 6900ff60ef7347a8c1445853a8f4689808e0976e
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date:   Mon Mar 26 17:50:24 2018 +0800

    expand: Fix glibc glob(3) support

Are you using glibc or is this a different glob(3) implementation?

If it is a different implementation then we will simply need to add
some build-time checks to detect the glob(3) implementation.

If this is glibc may I ask what version you're using?

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux