Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2013 04:27:10 +0000 (UTC)
From:      "Andrey A. Chernov" <ache@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r254353 - stable/9/lib/libc/gen
Message-ID:  <201308150427.r7F4RA1j033992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308150427.r7F4RA1j033992>