nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash-4.4-patch-3.patch

50ece2
From 4f59a8babc53a9f975078c4a003bdc8831c5ee22 Mon Sep 17 00:00:00 2001
50ece2
From: Chet Ramey <chet.ramey@case.edu>
50ece2
Date: Mon, 14 Nov 2016 14:27:23 -0500
50ece2
Subject: [PATCH] Bash-4.4 patch 3
50ece2
50ece2
---
50ece2
 lib/glob/sm_loop.c | 9 +++++++++
50ece2
 patchlevel.h       | 2 +-
50ece2
 2 files changed, 10 insertions(+), 1 deletion(-)
50ece2
50ece2
diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c
50ece2
index c3a2aa3..65179e2 100644
50ece2
--- a/lib/glob/sm_loop.c
50ece2
+++ b/lib/glob/sm_loop.c
50ece2
@@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
50ece2
   for (pc = 0; p[pc]; pc++)
50ece2
     if (p[pc] == L('.') && p[pc+1] == L(']'))
50ece2
       break;
50ece2
+   if (p[pc] == 0)
50ece2
+    {
50ece2
+      if (vp)
50ece2
+	*vp = INVALID;
50ece2
+      return (p + pc);
50ece2
+    }
50ece2
    val = COLLSYM (p, pc);
50ece2
    if (vp)
50ece2
      *vp = val;
50ece2
@@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
50ece2
       c = *p++;
50ece2
       c = FOLD (c);
50ece2
 
50ece2
+      if (c == L('\0'))
50ece2
+	return ((test == L('[')) ? savep : (CHAR *)0);
50ece2
+
50ece2
       if ((flags & FNM_PATHNAME) && c == L('/'))
50ece2
 	/* [/] can never match when matching a pathname.  */
50ece2
 	return (CHAR *)0;
50ece2
diff --git a/patchlevel.h b/patchlevel.h
50ece2
index a988d85..e7e960c 100644
50ece2
--- a/patchlevel.h
50ece2
+++ b/patchlevel.h
50ece2
@@ -25,6 +25,6 @@
50ece2
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
50ece2
    looks for to find the patch level (for the sccs version string). */
50ece2
 
50ece2
-#define PATCHLEVEL 2
50ece2
+#define PATCHLEVEL 3
50ece2
 
50ece2
 #endif /* _PATCHLEVEL_H_ */
50ece2
-- 
50ece2
2.9.3
50ece2