]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.4 patch 3
authorChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:23 +0000 (14:27 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:23 +0000 (14:27 -0500)
lib/glob/sm_loop.c
patchlevel.h

index c3a2aa37232a5bef0e1ec3015953c050d978e948..65179e24486e4819796f79c9f8128a16c366dace 100644 (file)
@@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
   for (pc = 0; p[pc]; pc++)
     if (p[pc] == L('.') && p[pc+1] == L(']'))
       break;
+   if (p[pc] == 0)
+    {
+      if (vp)
+       *vp = INVALID;
+      return (p + pc);
+    }
    val = COLLSYM (p, pc);
    if (vp)
      *vp = val;
@@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
       c = *p++;
       c = FOLD (c);
 
+      if (c == L('\0'))
+       return ((test == L('[')) ? savep : (CHAR *)0);
+
       if ((flags & FNM_PATHNAME) && c == L('/'))
        /* [/] can never match when matching a pathname.  */
        return (CHAR *)0;
index a988d852644985230969d343fdc0c88a3626f7a4..e7e960c1a28cc30fc0a3fa8257bb326b4140442c 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 2
+#define PATCHLEVEL 3
 
 #endif /* _PATCHLEVEL_H_ */