From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5743 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: fnmatch.h bug? Date: Wed, 6 Aug 2014 08:28:00 +0200 Message-ID: <20140806062759.GG22308@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1407306515 19320 80.91.229.3 (6 Aug 2014 06:28:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2014 06:28:35 +0000 (UTC) Cc: musl@lists.openwall.com To: ????????? Original-X-From: musl-return-5748-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 06 08:28:28 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XEui2-0007dU-En for gllmg-musl@plane.gmane.org; Wed, 06 Aug 2014 08:28:26 +0200 Original-Received: (qmail 7752 invoked by uid 550); 6 Aug 2014 06:28:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7686 invoked from network); 6 Aug 2014 06:28:12 -0000 Mail-Followup-To: ????????? , musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:5743 Archived-At: * ????????? [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)