From: Mattias Ellert Date: Wed, 28 May 2014 05:05:49 +0000 (+0200) Subject: Break infinite recursion that leads to segfault. X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~207^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bd456d77bd035aadff61122868d02291f7898ea;p=graphviz Break infinite recursion that leads to segfault. --- diff --git a/lib/dotgen/compound.c b/lib/dotgen/compound.c index ac78cd577..7156103af 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;