7 Bug-Reported-by: Koichi MURASE <myoga.murase@gmail.com>
8 Bug-Reference-ID: <CAFLRLk-V+1AeQ2k=pY7ih6V+MfQ_w8EF3YWL2E+wmLfgKBtzXA@mail.gmail.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00050.html
13 Under certain circumstances, bash will evaluate arithmetic expressions as
14 part of reading an expression token even when evaluation is suppressed. This
15 happens while evaluating a conditional expression and skipping over the
16 failed branch of the expression.
18 Patch (apply with `patch -p0'):
20 *** ../bash-4.4-patched/expr.c 2015-10-11 14:46:36.000000000 -0400
21 --- expr.c 2016-11-08 11:55:46.000000000 -0500
24 if (curtok == QUES) /* found conditional expr */
27 - if (curtok == 0 || curtok == COL)
28 - evalerror (_("expression expected"));
38 + if (curtok == 0 || curtok == COL)
39 + evalerror (_("expression expected"));
41 val1 = EXP_HIGHEST ();
46 evalerror (_("`:' expected for conditional expression"));
49 ! evalerror (_("expression expected"));
54 evalerror (_("`:' expected for conditional expression"));
65 + evalerror (_("expression expected"));
70 *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
71 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
74 looks for to find the patch level (for the sccs version string). */
76 ! #define PATCHLEVEL 7
78 #endif /* _PATCHLEVEL_H_ */
80 looks for to find the patch level (for the sccs version string). */
82 ! #define PATCHLEVEL 8
84 #endif /* _PATCHLEVEL_H_ */