components/bash/patches/bash42-039.patch
changeset 5518 c47fe0edc204
parent 5517 7758049098f4
child 5519 a02d4d12218f
equal deleted inserted replaced
5517:7758049098f4 5518:c47fe0edc204
     1 			     BASH PATCH REPORT
       
     2 			     =================
       
     3 
       
     4 Bash-Release:	4.2
       
     5 Patch-ID:	bash42-039
       
     6 
       
     7 Bug-Reported-by:	Dan Douglas <[email protected]>
       
     8 Bug-Reference-ID:	<1498458.MpVlmOXDB7@smorgbox>
       
     9 Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-09/msg00008.html
       
    10 
       
    11 Bug-Description:
       
    12 
       
    13 Under certain circumstances, bash attempts to expand variables in arithmetic
       
    14 expressions even when evaluation is being suppressed.
       
    15 
       
    16 Patch (apply with `patch -p0'):
       
    17 
       
    18 *** ../bash-4.2-patched/expr.c	2011-11-21 18:03:35.000000000 -0500
       
    19 --- expr.c	2012-09-09 16:31:18.000000000 -0400
       
    20 ***************
       
    21 *** 1010,1013 ****
       
    22 --- 1073,1082 ----
       
    23   #endif
       
    24   
       
    25 + /*itrace("expr_streval: %s: noeval = %d", tok, noeval);*/
       
    26 +   /* If we are suppressing evaluation, just short-circuit here instead of
       
    27 +      going through the rest of the evaluator. */
       
    28 +   if (noeval)
       
    29 +     return (0);
       
    30 + 
       
    31     /* [[[[[ */
       
    32   #if defined (ARRAY_VARS)
       
    33 ***************
       
    34 *** 1183,1186 ****
       
    35 --- 1256,1263 ----
       
    36   
       
    37         *cp = '\0';
       
    38 +       /* XXX - watch out for pointer aliasing issues here */
       
    39 +       if (curlval.tokstr && curlval.tokstr == tokstr)
       
    40 + 	init_lvalue (&curlval);
       
    41 + 
       
    42         FREE (tokstr);
       
    43         tokstr = savestring (tp);
       
    44 *** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
       
    45 --- patchlevel.h	Thu Feb 24 21:41:34 2011
       
    46 ***************
       
    47 *** 26,30 ****
       
    48      looks for to find the patch level (for the sccs version string). */
       
    49   
       
    50 ! #define PATCHLEVEL 38
       
    51   
       
    52   #endif /* _PATCHLEVEL_H_ */
       
    53 --- 26,30 ----
       
    54      looks for to find the patch level (for the sccs version string). */
       
    55   
       
    56 ! #define PATCHLEVEL 39
       
    57   
       
    58   #endif /* _PATCHLEVEL_H_ */