psss / rpms / bash

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