|
|
ff19ae |
BASH PATCH REPORT
|
|
|
ff19ae |
=================
|
|
|
ff19ae |
|
|
|
ff19ae |
Bash-Release: 4.2
|
|
|
ff19ae |
Patch-ID: bash42-039
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
|
|
|
ff19ae |
Bug-Reference-ID: <1498458.MpVlmOXDB7@smorgbox>
|
|
|
ff19ae |
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-09/msg00008.html
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Description:
|
|
|
ff19ae |
|
|
|
ff19ae |
Under certain circumstances, bash attempts to expand variables in arithmetic
|
|
|
ff19ae |
expressions even when evaluation is being suppressed.
|
|
|
ff19ae |
|
|
|
ff19ae |
Patch (apply with `patch -p0'):
|
|
|
ff19ae |
|
|
|
ff19ae |
*** ../bash-4.2-patched/expr.c 2011-11-21 18:03:35.000000000 -0500
|
|
|
ff19ae |
--- expr.c 2012-09-09 16:31:18.000000000 -0400
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 1010,1013 ****
|
|
|
ff19ae |
--- 1073,1082 ----
|
|
|
ff19ae |
#endif
|
|
|
ff19ae |
|
|
|
ff19ae |
+ /*itrace("expr_streval: %s: noeval = %d", tok, noeval);*/
|
|
|
ff19ae |
+ /* If we are suppressing evaluation, just short-circuit here instead of
|
|
|
ff19ae |
+ going through the rest of the evaluator. */
|
|
|
ff19ae |
+ if (noeval)
|
|
|
ff19ae |
+ return (0);
|
|
|
ff19ae |
+
|
|
|
ff19ae |
/* [[[[[ */
|
|
|
ff19ae |
#if defined (ARRAY_VARS)
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 1183,1186 ****
|
|
|
ff19ae |
--- 1256,1263 ----
|
|
|
ff19ae |
|
|
|
ff19ae |
*cp = '\0';
|
|
|
ff19ae |
+ /* XXX - watch out for pointer aliasing issues here */
|
|
|
ff19ae |
+ if (curlval.tokstr && curlval.tokstr == tokstr)
|
|
|
ff19ae |
+ init_lvalue (&curlval);
|
|
|
ff19ae |
+
|
|
|
ff19ae |
FREE (tokstr);
|
|
|
ff19ae |
tokstr = savestring (tp);
|
|
|
ff19ae |
*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
|
|
|
ff19ae |
--- patchlevel.h Thu Feb 24 21:41:34 2011
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 26,30 ****
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 38
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|
|
|
ff19ae |
--- 26,30 ----
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 39
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|