diff --git a/bash-4.2-xdupmbstowcs2-patch b/bash-4.2-xdupmbstowcs2-patch new file mode 100644 index 0000000..a16e477 --- /dev/null +++ b/bash-4.2-xdupmbstowcs2-patch @@ -0,0 +1,19 @@ +*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.000000000 -0400 +--- lib/glob/xmbsrtowcs.c 2011-03-14 14:22:11.000000000 -0400 +*************** +*** 174,180 **** + wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state); + + /* Conversion failed. */ +! if (wcslength == (size_t)-1) + { + free (wsbuf); + *destp = NULL; +--- 174,180 ---- + wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state); + + /* Conversion failed. */ +! if (wcslength == 0 || wcslength == (size_t)-1) + { + free (wsbuf); + *destp = NULL; diff --git a/bash.spec b/bash.spec index 6ee23bc..55cc850 100644 --- a/bash.spec +++ b/bash.spec @@ -6,7 +6,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 2%{?dist} +Release: 3%{?dist} Group: System Environment/Shells License: GPLv3+ Url: http://www.gnu.org/software/bash @@ -62,6 +62,9 @@ Patch120: bash-4.2-rc2-logout.patch # Static analyzis shows some issues in bash-2.05a-interpreter.patch Patch121: bash-4.2-coverity.patch +# 684293, Fix the infinite loop with invalid wide char +Patch122: bash-4.2-xdupmbstowcs2-patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: texinfo bison @@ -119,6 +122,7 @@ This package contains documentation files for %{name}. %patch119 -p1 -b .broken_pipe %patch120 -p1 -b .logout %patch121 -p1 -b .coverity +%patch122 -p0 -b .xdupmbstowcs2 echo %{version} > _distribution echo %{release} > _patchlevel @@ -306,6 +310,9 @@ end #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Tue Mar 15 2011 Roman Rakus - 4.2.7-3 +- #684293, fix the infinite loop with invalid wide char + * Mon Mar 14 2011 Roman Rakus - 4.2.7-2 - Use lua script in postun