From 496f3c182d858199a1f403f52bdc1288f08cef78 Mon Sep 17 00:00:00 2001 From: Roman Rakus Date: Dec 11 2009 11:35:39 +0000 Subject: Don't segfault when TERM=eterm* and EMACS is unset (#530911) --- diff --git a/bash-4.0-emacs.patch b/bash-4.0-emacs.patch new file mode 100644 index 0000000..c94a57d --- /dev/null +++ b/bash-4.0-emacs.patch @@ -0,0 +1,11 @@ +--- bash-4.0/shell.c.orig 2009-10-15 15:57:56.000000000 -0400 ++++ bash-4.0/shell.c 2009-10-15 15:58:28.000000000 -0400 +@@ -572,7 +572,7 @@ + + /* running_under_emacs == 2 for `eterm' */ + running_under_emacs = (emacs != 0) || (term && STREQN (term, "emacs", 5)); +- running_under_emacs += term && STREQN (term, "eterm", 5) && strstr (emacs, "term"); ++ running_under_emacs += term && STREQN (term, "eterm", 5) && (emacs != 0) && strstr (emacs, "term"); + + if (running_under_emacs) + gnu_error_format = 1; diff --git a/bash.spec b/bash.spec index 70dadf6..4a1db66 100644 --- a/bash.spec +++ b/bash.spec @@ -5,7 +5,7 @@ Version: %{baseversion}%{patchlevel} Name: bash Summary: The GNU Bourne Again shell -Release: 1%{?dist} +Release: 2%{?dist} Group: System Environment/Shells License: GPLv2+ Url: http://www.gnu.org/software/bash @@ -76,6 +76,9 @@ Patch118: bash-tty-tests.patch # 484809, check if interp section is NOBITS Patch123: bash-4.0-nobits.patch +# 530911, bash was segfaulting when TERM=eterm* and EMACS was unset +Patch124: bash-4.0-emacs.patch + Requires(post): ncurses-libs BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -157,6 +160,7 @@ This package contains documentation files for %{name}. %patch117 -p1 -b .setlocale %patch118 -p1 -b .tty_tests %patch123 -p1 -b .nobits +%patch124 -p1 -b .emacs echo %{version} > _distribution echo %{release} > _patchlevel @@ -323,6 +327,9 @@ fi #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Fri Dec 11 2009 Roman Rakus - 4.0.33-2 +- Don't segfault when TERM=eterm* and EMACS is unset (#530911) + * Wed Sep 16 2009 Roman Rakus - 4.0.33-1 - Patch level 33 - spec file cleanup