summaryrefslogtreecommitdiffstats
path: root/utils/bash/patches/137-upstream-bash43-037.patch
blob: 946e9fe14e6c80ff2ebc4f3e023a4d8de328c84a (plain)
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
			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	Greg Wooledge <wooledg@eeg.ccf.org>
Bug-Reference-ID:	<20150204144240.GN13956@eeg.ccf.org>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html

Bug-Description:

If an associative array uses `@' or `*' as a subscript, `declare -p' produces
output that cannot be reused as input.

Patch (apply with `patch -p0'):

--- a/assoc.c
+++ b/assoc.c
@@ -436,6 +436,8 @@ assoc_to_assign (hash, quoted)
 #if 1
 	if (sh_contains_shell_metas (tlist->key))
 	  istr = sh_double_quote (tlist->key);
+	else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
+	  istr = sh_double_quote (tlist->key);	
 	else
 	  istr = tlist->key;	
 #else
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 36
+#define PATCHLEVEL 37
 
 #endif /* _PATCHLEVEL_H_ */