Merge pull request #4950 from StevenHessing/noddos
[feed/packages.git] / utils / bash / patches / 108-upstream-bash44-008.patch
1 Index: bash-4.4/expr.c
2 ===================================================================
3 --- bash-4.4.orig/expr.c
4 +++ bash-4.4/expr.c
5 @@ -578,24 +578,23 @@ expcond ()
6 rval = cval = explor ();
7 if (curtok == QUES) /* found conditional expr */
8 {
9 - readtok ();
10 - if (curtok == 0 || curtok == COL)
11 - evalerror (_("expression expected"));
12 if (cval == 0)
13 {
14 set_noeval = 1;
15 noeval++;
16 }
17
18 + readtok ();
19 + if (curtok == 0 || curtok == COL)
20 + evalerror (_("expression expected"));
21 +
22 val1 = EXP_HIGHEST ();
23
24 if (set_noeval)
25 noeval--;
26 if (curtok != COL)
27 evalerror (_("`:' expected for conditional expression"));
28 - readtok ();
29 - if (curtok == 0)
30 - evalerror (_("expression expected"));
31 +
32 set_noeval = 0;
33 if (cval)
34 {
35 @@ -603,7 +602,11 @@ expcond ()
36 noeval++;
37 }
38
39 + readtok ();
40 + if (curtok == 0)
41 + evalerror (_("expression expected"));
42 val2 = expcond ();
43 +
44 if (set_noeval)
45 noeval--;
46 rval = cval ? val1 : val2;
47 Index: bash-4.4/patchlevel.h
48 ===================================================================
49 --- bash-4.4.orig/patchlevel.h
50 +++ bash-4.4/patchlevel.h
51 @@ -25,6 +25,6 @@
52 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
53 looks for to find the patch level (for the sccs version string). */
54
55 -#define PATCHLEVEL 7
56 +#define PATCHLEVEL 8
57
58 #endif /* _PATCHLEVEL_H_ */