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