From cce58163134fcadfbeb4ffb05a645385505c92d5 Mon Sep 17 00:00:00 2001 From: Roman Rakus Date: Aug 26 2009 14:52:06 +0000 Subject: alloc memory for key in creation of associative array (#518644) --- diff --git a/bash-4.0-key_alloc.patch b/bash-4.0-key_alloc.patch new file mode 100644 index 0000000..e8975dd --- /dev/null +++ b/bash-4.0-key_alloc.patch @@ -0,0 +1,11 @@ +diff -up bash-4.0/assoc.c.key_alloc bash-4.0/assoc.c +--- bash-4.0/assoc.c.key_alloc 2009-08-26 16:17:50.000000000 +0200 ++++ bash-4.0/assoc.c 2009-08-26 16:18:42.000000000 +0200 +@@ -77,6 +77,7 @@ assoc_insert (hash, key, value) + b = hash_search (key, hash, HASH_CREATE); + if (b == 0) + return -1; ++ b->key = savestring (key); + FREE (b->data); + b->data = value ? savestring (value) : (char *)0; + return (0); diff --git a/bash.spec b/bash.spec index 3bf9105..0a43bc9 100644 --- a/bash.spec +++ b/bash.spec @@ -71,6 +71,9 @@ Patch118: bash-tty-tests.patch #Patch120: bash-4.0-no_debug_output.patch #Patch121: bash-4.0-shell_pipelines_handling.patch +# 518644, alloc memory for key in associative array creation +Patch122: bash-4.0-key_alloc.patch + Requires(post): ncurses-libs BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -150,6 +153,7 @@ This package contains documentation files for %{name}. #%patch119 -p1 -b .ulimit-m #%patch120 -p1 -b .no_debug_output #%patch121 -p1 -b .pipelines_handling +%patch122 -p1 -b .key_alloc echo %{version} > _distribution echo %{release} > _patchlevel @@ -313,6 +317,9 @@ fi #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Wed Aug 26 2009 Roman Rakus - 4.0.28-2 +- alloc memory for key in creation associative array (#518644) + * Tue Jul 28 2009 Roman Rakus - 4.0.28-1 - Upstream patch level 28