[texinfo] Fix info segfaults on non existing info page when used with -o

vcrhonek vcrhonek at fedoraproject.org
Thu Jan 16 08:35:02 UTC 2014


commit cc03afcbbd720e3c5e025d84dffdb1ba6763b84b
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Thu Jan 16 09:35:08 2014 +0100

    Fix info segfaults on non existing info page when used with -o

 texinfo-5.2-non-existing-info-page-segfault.patch |   18 ++++++++++++++++++
 texinfo.spec                                      |    8 +++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/texinfo-5.2-non-existing-info-page-segfault.patch b/texinfo-5.2-non-existing-info-page-segfault.patch
new file mode 100644
index 0000000..1251d07
--- /dev/null
+++ b/texinfo-5.2-non-existing-info-page-segfault.patch
@@ -0,0 +1,18 @@
+diff -up texinfo-5.2/info/info.c.orig texinfo-5.2/info/info.c
+--- texinfo-5.2/info/info.c.orig	2014-01-16 08:55:50.084084818 +0100
++++ texinfo-5.2/info/info.c	2014-01-16 08:55:55.464112252 +0100
+@@ -859,7 +859,13 @@ show_error_node (NODE *node)
+ {
+   if (info_error_rings_bell_p)
+     terminal_ring_bell ();
+-  if (!echo_area_is_active)
++  if (user_output_filename)
++    {
++      if (node->contents[node->nodelen - 1] == '\n')
++        node->contents[node->nodelen - 1] = 0;
++      info_error ("%s", node->contents);
++    }
++  else if (!echo_area_is_active)
+     {
+       free_echo_area ();
+       window_set_node_of_window (the_echo_area, node);
diff --git a/texinfo.spec b/texinfo.spec
index cbd7c85..f5df8a5 100644
--- a/texinfo.spec
+++ b/texinfo.spec
@@ -3,7 +3,7 @@
 Summary: Tools needed to create Texinfo format documentation files
 Name: texinfo
 Version: 5.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv3+
 Group: Applications/Publishing
 Url: http://www.gnu.org/software/texinfo/
@@ -12,6 +12,8 @@ Source1: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz.sig
 Source2: info-dir
 Patch0: texinfo-4.12-zlib.patch
 Patch1: texinfo-4.13a-powerpc.patch
+# Patch2: bz#1053129, already upstream
+Patch2: texinfo-5.2-non-existing-info-page-segfault.patch
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 Requires: perl >= 5.7.3, perl(Text::Unidecode)
@@ -57,6 +59,7 @@ for printing using TeX.
 %setup -q
 %patch0 -p1 -b .zlib
 %patch1 -p1 -b .powerpc
+%patch2 -p1 -b .non-existing-info-page-segfault
 
 %build
 %configure --with-external-Text-Unidecode \
@@ -151,6 +154,9 @@ fi
 %{_mandir}/man1/pdftexi2dvi.1*
 
 %changelog
+* Thu Jan 16 2014 Vitezslav Crhonek <vcrhonek at redhat.com> - 5.2-2
+- Fix info segfaults on non existing info page when used with -o
+
 * Tue Oct 01 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 5.2-1
 - Update to texinfo-5.2
 


More information about the scm-commits mailing list