Merge pull request #4950 from StevenHessing/noddos
[feed/packages.git] / utils / bash / patches / 103-upstream-bash44-003.patch
1 Index: bash-4.4/lib/glob/sm_loop.c
2 ===================================================================
3 --- bash-4.4.orig/lib/glob/sm_loop.c
4 +++ bash-4.4/lib/glob/sm_loop.c
5 @@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
6 for (pc = 0; p[pc]; pc++)
7 if (p[pc] == L('.') && p[pc+1] == L(']'))
8 break;
9 + if (p[pc] == 0)
10 + {
11 + if (vp)
12 + *vp = INVALID;
13 + return (p + pc);
14 + }
15 val = COLLSYM (p, pc);
16 if (vp)
17 *vp = val;
18 @@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
19 c = *p++;
20 c = FOLD (c);
21
22 + if (c == L('\0'))
23 + return ((test == L('[')) ? savep : (CHAR *)0);
24 +
25 if ((flags & FNM_PATHNAME) && c == L('/'))
26 /* [/] can never match when matching a pathname. */
27 return (CHAR *)0;
28 Index: bash-4.4/patchlevel.h
29 ===================================================================
30 --- bash-4.4.orig/patchlevel.h
31 +++ bash-4.4/patchlevel.h
32 @@ -25,6 +25,6 @@
33 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
34 looks for to find the patch level (for the sccs version string). */
35
36 -#define PATCHLEVEL 2
37 +#define PATCHLEVEL 3
38
39 #endif /* _PATCHLEVEL_H_ */