139-upstream-bash43-039.patch (1349B)
1 BASH PATCH REPORT 2 ================= 3 4 Bash-Release: 4.3 5 Patch-ID: bash43-039 6 7 Bug-Reported-by: SN <poczta-sn@gazeta.pl> 8 Bug-Reference-ID: <54E2554C.205@gazeta.pl> 9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html 10 11 Bug-Description: 12 13 Using the output of `declare -p' when run in a function can result in variables 14 that are invisible to `declare -p'. This problem occurs when an assignment 15 builtin such as `declare' receives a quoted compound array assignment as one of 16 its arguments. 17 18 Patch (apply with `patch -p0'): 19 20 --- a/arrayfunc.c 21 +++ b/arrayfunc.c 22 @@ -404,6 +404,9 @@ assign_array_var_from_word_list (var, li 23 (*var->assign_func) (var, l->word->word, i, 0); 24 else 25 array_insert (a, i, l->word->word); 26 + 27 + VUNSETATTR (var, att_invisible); /* no longer invisible */ 28 + 29 return var; 30 } 31 32 @@ -634,6 +637,10 @@ assign_array_var_from_string (var, value 33 34 if (nlist) 35 dispose_words (nlist); 36 + 37 + if (var) 38 + VUNSETATTR (var, att_invisible); /* no longer invisible */ 39 + 40 return (var); 41 } 42 43 --- a/patchlevel.h 44 +++ b/patchlevel.h 45 @@ -25,6 +25,6 @@ 46 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 47 looks for to find the patch level (for the sccs version string). */ 48 49 -#define PATCHLEVEL 38 50 +#define PATCHLEVEL 39 51 52 #endif /* _PATCHLEVEL_H_ */