7 Bug-Reported-by: Dennis van Dok <dvandok@gmail.com>
8 Bug-Reference-ID: <4BBF2501.5050703@gmail.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-04/msg00038.html
13 When declaring an associative array and implicitly assigning a value
14 to element "0", bash does not correctly allocate memory, leading to
15 a segmentation violation when that element or the array itself is
18 Patch (apply with `patch -p0'):
20 *** ../bash-4.1-patched/builtins/declare.def 2009-11-25 19:42:00.000000000 -0500
21 --- builtins/declare.def 2010-05-30 18:25:21.000000000 -0400
24 /* let bind_{array,assoc}_variable take care of this. */
26 ! bind_assoc_variable (var, name, "0", value, aflags);
28 bind_array_variable (name, 0, value, aflags);
30 /* let bind_{array,assoc}_variable take care of this. */
32 ! bind_assoc_variable (var, name, savestring ("0"), value, aflags);
34 bind_array_variable (name, 0, value, aflags);
35 *** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
36 --- patchlevel.h 2010-01-14 09:38:08.000000000 -0500
39 looks for to find the patch level (for the sccs version string). */
41 ! #define PATCHLEVEL 7
43 #endif /* _PATCHLEVEL_H_ */
45 looks for to find the patch level (for the sccs version string). */
47 ! #define PATCHLEVEL 8
49 #endif /* _PATCHLEVEL_H_ */