nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash42-039

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