Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 6 Aug 2014 11:01:40 +0800
From: 林冠儒 <g548462@...il.com>
To: musl@...ts.openwall.com
Subject: fnmatch.h bug?

When I using the musl-libc "fnmatch" function, I found that the return
value is different from glibc.

For example:

musl-libc:
     i = fnmatch( "a\\.c" , "a\.c" , 0 ); // it will return 0 -> i = 0
glibc:
     i = fnmatch( "a\\.c" , "a\.c" , 0 ); // it will also return 0 -> i = 0

So, we know that "a.\\c" will escape " \ " in pattern and will NOT escape
in string.

But in the case:

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,
Thank you!

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.