From: "(GalaxyMaster)" <galaxy@openwall.com.au>
To: musl@lists.openwall.com
Subject: Re: [musl] is fnmatch() a bit broken?
Date: Mon, 9 Jan 2023 07:57:56 +0000 [thread overview]
Message-ID: <0100018595893ac1-a4a3abcd-d50b-4907-a6bb-6a58d923e6b6-000000@email.amazonses.com> (raw)
In-Reply-To: <20230109073213.GB4163@brightrain.aerifal.cx>
Rich,
On Mon, Jan 09, 2023 at 02:32:13AM -0500, Rich Felker wrote:
> > galaxy@apollo:~/musl-fnmatch $ ./musl-fnmatch
> > fnmatch("abc", "abc", 0) = 0 (expected: 0)
> > fnmatch("[1\]] [1\]]", "1 ]", 0) = 1 (expected: 0)
>
> This difference is intentional because glibc's behavior is contrary to
> the spec.
Thanks for the explanation, today I learnt something :). However, you said:
> A '\' can escape the '[' and make it non-special (not
> open a bracket) but the '-' inside the bracket is not "special" to
> begin with -- it's just part of the bracket syntax. Likewise with the
> closing ']' case.
Which brings a question on the "[1\]] [1\]]" use case not matching "1 ]". If I
read your response correctly, it is expected to actually match on musl, did I
get it wrong?
--
(GM)
next prev parent reply other threads:[~2023-01-09 7:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 13:45 (GalaxyMaster)
2023-01-09 7:32 ` Rich Felker
2023-01-09 7:57 ` (GalaxyMaster) [this message]
2023-01-09 8:09 ` Rich Felker
2023-01-09 8:24 ` (GalaxyMaster)
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=0100018595893ac1-a4a3abcd-d50b-4907-a6bb-6a58d923e6b6-000000@email.amazonses.com \
--to=galaxy@openwall.com.au \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).