summaryrefslogtreecommitdiffstats
path: root/package/bash/bash-4.2-011.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2012-01-24 13:29:06 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2012-01-24 23:41:22 +0100
commit5bedeb2fb36d8b36dc1e7392a2fc16e0bd1a0e81 (patch)
tree5b17e00bb0c61b0040f7357683f853f1a11a6703 /package/bash/bash-4.2-011.patch
parentce7a7896c5cdc4ecc6a5ca16f9403c57d0a329f9 (diff)
downloadbuildroot-novena-5bedeb2fb36d8b36dc1e7392a2fc16e0bd1a0e81.tar.gz
buildroot-novena-5bedeb2fb36d8b36dc1e7392a2fc16e0bd1a0e81.zip
bash: bump to version 4.2 pl20
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/bash/bash-4.2-011.patch')
-rw-r--r--package/bash/bash-4.2-011.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/bash/bash-4.2-011.patch b/package/bash/bash-4.2-011.patch
new file mode 100644
index 000000000..802c1f122
--- /dev/null
+++ b/package/bash/bash-4.2-011.patch
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-011
+
+Bug-Reported-by: "David Parks" <davidparks21@yahoo.com>
+Bug-Reference-ID: <014101cc82c6$46ac1540$d4043fc0$@com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00031.html
+
+Bug-Description:
+
+Overwriting a value in an associative array causes the memory allocated to
+store the key on the second and subsequent assignments to leak.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/assoc.c 2009-08-05 20:19:40.000000000 -0400
+--- ./assoc.c 2011-10-04 20:23:07.000000000 -0400
+***************
+*** 78,81 ****
+--- 78,86 ----
+ if (b == 0)
+ return -1;
++ /* If we are overwriting an existing element's value, we're not going to
++ use the key. Nothing in the array assignment code path frees the key
++ string, so we can free it here to avoid a memory leak. */
++ if (b->key != key)
++ free (key);
+ FREE (b->data);
+ b->data = value ? savestring (value) : (char *)0;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- ./patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */