summaryrefslogtreecommitdiffstats
path: root/source/a/bash/bash-4.3-patches/bash43-017
blob: 4016fb934e6de5c68bf81646bb26f6b611b34c68 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.3
Patch-ID:	bash43-017

Bug-Reported-by:	Dan Douglas <ormaaj@gmail.com>
Bug-Reference-ID:	<7781746.RhfoTROLxF@smorgbox>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-05/msg00026.html

Bug-Description:

The code that creates local variables should not clear the `invisible'
attribute when returning an existing local variable.  Let the code that
actually assigns a value clear it.

Patch (apply with `patch -p0'):
*** ../bash-4.3-patched/variables.c	2014-02-14 11:55:12.000000000 -0500
--- variables.c	2014-05-07 10:53:57.000000000 -0400
***************
*** 2198,2205 ****
    old_var = find_variable (name);
    if (old_var && local_p (old_var) && old_var->context == variable_context)
!     {
!       VUNSETATTR (old_var, att_invisible);	/* XXX */
!       return (old_var);
!     }
  
    was_tmpvar = old_var && tempvar_p (old_var);
--- 2260,2264 ----
    old_var = find_variable (name);
    if (old_var && local_p (old_var) && old_var->context == variable_context)
!     return (old_var);
  
    was_tmpvar = old_var && tempvar_p (old_var);

*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 16
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 17
  
  #endif /* _PATCHLEVEL_H_ */