SHA256
12
0
forked from pool/bash
2010-04-12 09:37:38 +00:00
committed by Git OBS Bridge
parent 3854846d14
commit 26420780dc
3 changed files with 25 additions and 0 deletions

18
bash-4.1-array.dif Normal file
View File

@@ -0,0 +1,18 @@
Andreas Schwab <schwab@linux-m68k.org> writes:
> $ declare -A a=b; unset a
> *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
And the obvious patch:
--- builtins/declare.def
+++ builtins/declare.def 2010-04-09 17:20:51.000000000 +0000
@@ -512,7 +512,7 @@ declare_internal (list, local_var)
{
/* let bind_{array,assoc}_variable take care of this. */
if (assoc_p (var))
- bind_assoc_variable (var, name, "0", value, aflags);
+ bind_assoc_variable (var, name, savestring ("0"), value, aflags);
else
bind_array_variable (name, 0, value, aflags);
}