From 76b3124896fd197c9d26c78355fdb060242e8563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 28 May 2014 15:30:46 +0200 Subject: [PATCH] Fixed crash by adding additional check to findVertical/Horizontal functions (by find-fix patch provided by Mattias Ellert ) Resolves: rhbz#1095419 --- graphviz-2.38.0-find-fix.patch | 36 ++++++++++++++++++++++++++++++++++ graphviz.spec | 9 ++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 graphviz-2.38.0-find-fix.patch diff --git a/graphviz-2.38.0-find-fix.patch b/graphviz-2.38.0-find-fix.patch new file mode 100644 index 0000000..835bb0a --- /dev/null +++ b/graphviz-2.38.0-find-fix.patch @@ -0,0 +1,36 @@ +From 2bd456d77bd035aadff61122868d02291f7898ea Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Wed, 28 May 2014 07:05:49 +0200 +Subject: [PATCH] Break infinite recursion that leads to segfault. + +--- + lib/dotgen/compound.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/dotgen/compound.c b/lib/dotgen/compound.c +index ac78cd5..7156103 100644 +--- a/lib/dotgen/compound.c ++++ b/lib/dotgen/compound.c +@@ -176,6 +176,9 @@ findVertical(pointf * pts, double tmin, double tmax, + double t; + int no_cross = countVertCross(pts, xcoord); + ++ if (tmin >= tmax) ++ return -1.0; ++ + if (no_cross == 0) + return -1.0; + +@@ -214,6 +217,9 @@ findHorizontal(pointf * pts, double tmin, double tmax, + double t; + int no_cross = countHorzCross(pts, ycoord); + ++ if (tmin >= tmax) ++ return -1.0; ++ + if (no_cross == 0) + return -1.0; + +-- +1.9.3 + diff --git a/graphviz.spec b/graphviz.spec index 0bac1fa..d5404dd 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -48,13 +48,14 @@ Name: graphviz Summary: Graph Visualization Tools Version: 2.38.0 -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/Multimedia License: EPL URL: http://www.graphviz.org/ Source0: http://www.graphviz.org/pub/graphviz/ARCHIVE/%{name}-%{version}.tar.gz # Fix typo in testsuite (upstream ticket #2441). Patch0: graphviz-2.38.0-rtest-fix.patch +Patch1: graphviz-2.38.0-find-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, libpng-devel, libjpeg-devel, expat-devel, freetype-devel >= 2 BuildRequires: ksh, bison, m4, flex, tk-devel, tcl-devel >= 8.3, swig @@ -258,6 +259,7 @@ Various tcl packages (extensions) for the graphviz tools. %prep %setup -q %patch0 -p1 -b .rtest-fix +%patch1 -p1 -b .find-fix # Attempt to fix rpmlint warnings about executable sources find -type f -regex '.*\.\(c\|h\)$' -exec chmod a-x {} ';' @@ -547,6 +549,11 @@ rm -rf %{buildroot} %changelog +* Wed May 28 2014 Jaroslav Škarvada - 2.38.0-5 +- Fixed crash by adding additional check to findVertical/Horizontal functions + (by find-fix patch provided by Mattias Ellert ) + Resolves: rhbz#1095419 + * Tue May 20 2014 Jaroslav Škarvada - 2.38.0-4 - Rebuilt for tcl/tk8.6