From: Szabolcs Nagy <nsz@port70.net>
To: ????????? <g548462@gmail.com>
Cc: musl@lists.openwall.com
Subject: Re: fnmatch.h bug?
Date: Wed, 6 Aug 2014 08:28:00 +0200 [thread overview]
Message-ID: <20140806062759.GG22308@port70.net> (raw)
In-Reply-To: <CA+yBz7OZ=5rNY94F7rgxSrSa-iSbsPj9Y0yZirKp+nAL6xDCQw@mail.gmail.com>
* ????????? <g548462@gmail.com> [2014-08-06 11:01:40 +0800]:
>
> musl-libc:
> i = fnmatch( "[[?*\\]" , "\\" , 0 ); // it will return 0 -> i = 0
> glibc:
> i = fnmatch( "[[?*\\]" , "\\" , 0 ); // it will return 1 -> i = 1
>
> The return value is DIFFERENT !
> I am confuse which library is wrong?
> If you have any idea, please response me and send an e-mail to me,
in a bracket expression a backslash loses its special meaning
so this pattern matches a single '[', '?', '*' or '\\' character
if glibc fails to match '\\' then it's a bug in their implementation
(this exact pattern is even part of the libc-test suite for fnmatch)
next prev parent reply other threads:[~2014-08-06 6:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 3:01 林冠儒
2014-08-06 6:28 ` Szabolcs Nagy [this message]
2014-08-06 10:03 ` 林冠儒
2014-08-06 10:23 ` Rich Felker
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=20140806062759.GG22308@port70.net \
--to=nsz@port70.net \
--cc=g548462@gmail.com \
--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).