rcolebaugh / rpms / bash

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