alloc memory for key in creation of associative array (#518644)

This commit is contained in:
Roman Rakus 2009-08-26 14:52:06 +00:00
parent dbeb5d3b5a
commit cce5816313
2 changed files with 18 additions and 0 deletions

11
bash-4.0-key_alloc.patch Normal file
View File

@ -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);

View File

@ -71,6 +71,9 @@ Patch118: bash-tty-tests.patch
#Patch120: bash-4.0-no_debug_output.patch #Patch120: bash-4.0-no_debug_output.patch
#Patch121: bash-4.0-shell_pipelines_handling.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 Requires(post): ncurses-libs
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 #%patch119 -p1 -b .ulimit-m
#%patch120 -p1 -b .no_debug_output #%patch120 -p1 -b .no_debug_output
#%patch121 -p1 -b .pipelines_handling #%patch121 -p1 -b .pipelines_handling
%patch122 -p1 -b .key_alloc
echo %{version} > _distribution echo %{version} > _distribution
echo %{release} > _patchlevel echo %{release} > _patchlevel
@ -313,6 +317,9 @@ fi
#%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog %changelog
* Wed Aug 26 2009 Roman Rakus <rrakus@redhat.com> - 4.0.28-2
- alloc memory for key in creation associative array (#518644)
* Tue Jul 28 2009 Roman Rakus <rrakus@redhat.com> - 4.0.28-1 * Tue Jul 28 2009 Roman Rakus <rrakus@redhat.com> - 4.0.28-1
- Upstream patch level 28 - Upstream patch level 28