1 From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-008
3 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
11 Bug-Reported-by: Koichi MURASE <myoga.murase@gmail.com>
12 Bug-Reference-ID: <CAFLRLk-V+1AeQ2k=pY7ih6V+MfQ_w8EF3YWL2E+wmLfgKBtzXA@mail.gmail.com>
13 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00050.html
17 Under certain circumstances, bash will evaluate arithmetic expressions as
18 part of reading an expression token even when evaluation is suppressed. This
19 happens while evaluating a conditional expression and skipping over the
20 failed branch of the expression.
22 Patch (apply with `patch -p0'):
24 *** bash-4.4-patched/expr.c 2015-10-11 14:46:36.000000000 -0400
25 --- b/expr.c 2016-11-08 11:55:46.000000000 -0500
28 if (curtok == QUES) /* found conditional expr */
31 - if (curtok == 0 || curtok == COL)
32 - evalerror (_("expression expected"));
42 + if (curtok == 0 || curtok == COL)
43 + evalerror (_("expression expected"));
45 val1 = EXP_HIGHEST ();
50 evalerror (_("`:' expected for conditional expression"));
53 ! evalerror (_("expression expected"));
58 evalerror (_("`:' expected for conditional expression"));
69 + evalerror (_("expression expected"));
74 *** bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
75 --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
78 looks for to find the patch level (for the sccs version string). */
80 ! #define PATCHLEVEL 7
82 #endif /* _PATCHLEVEL_H_ */
84 looks for to find the patch level (for the sccs version string). */
86 ! #define PATCHLEVEL 8
88 #endif /* _PATCHLEVEL_H_ */