Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 133872 Details for
Bug 181275
sys-libs/uclibc-0.9.28.3 performs fnmatch(..., ..., FNM_PATHNAME) incorrectly when slash only in string and not pattern
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
uclibc-fnmatch.c
uclibc-fnmatch.c (text/plain), 907 bytes, created by
Fernando J. Pereda (RETIRED)
on 2007-10-19 08:52:16 UTC
(
hide
)
Description:
uclibc-fnmatch.c
Filename:
MIME Type:
Creator:
Fernando J. Pereda (RETIRED)
Created:
2007-10-19 08:52:16 UTC
Size:
907 bytes
patch
obsolete
>#include <stdlib.h> >#include <stdio.h> >#include <fnmatch.h> > >int main(int argc, char *argv[]) >{ > int st = EXIT_SUCCESS; > const char *pattern = "*.foo"; > struct test { > char *str; > int expect; > int flags; > } tests[] = { > { .str = "a.foo", .expect = 0, .flags = FNM_PATHNAME}, > { .str = "a.foo", .expect = 0, .flags = 0}, > { .str = "bar/a.foo", .expect = FNM_NOMATCH, .flags = FNM_PATHNAME }, > { .str = "bar/a.foo", .expect = 0, .flags = 0}, > }; > >#define SIZEOF_ARRAY(a) (sizeof(a)/sizeof(a[0])) > > unsigned i; > for (i = 0; i < SIZEOF_ARRAY(tests); i++) { > struct test *t = tests + i; > printf("fnmatch(%s, %s, %d) = ", pattern, t->str, t->flags); > int ret = fnmatch(pattern, t->str, t->flags); > if (ret == FNM_NOMATCH) > printf("FNM_NOMATCH"); > else > printf("%d", ret); > if (ret == t->expect) > printf(" -> Ok\n"); > else { > printf(" -> FAIL\n"); > st = EXIT_FAILURE; > } > } > > return st; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 181275
:
121470
|
121471
|
132079
| 133872 |
139677