nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

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

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