Author: ache Date: Thu Aug 15 04:27:10 2013 New Revision: 254353 URL: http://svnweb.freebsd.org/changeset/base/254353
Log: MFC: r254091 According to POSIX \ in the fnmatch(3) pattern should escape any character including '\0', but our version replace escaped '\0' with '\\'. I.e. fnmatch("\\", "\\", 0) should not match while fnmatch("\\", "", 0) should (Linux and NetBSD does the same). Was vice versa. PR: 181129 Modified: stable/9/lib/libc/gen/fnmatch.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/fnmatch.c ============================================================================== --- stable/9/lib/libc/gen/fnmatch.c Thu Aug 15 04:25:16 2013 (r254352) +++ stable/9/lib/libc/gen/fnmatch.c Thu Aug 15 04:27:10 2013 (r254353) @@ -194,8 +194,6 @@ fnmatch1(pattern, string, stringstart, f &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); - if (pclen == 0) - pc = '\\'; pattern += pclen; } /* FALLTHROUGH */ _______________________________________________ svn-src-stable-9@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"