From: Matthew Fernandez Date: Tue, 28 Jun 2022 01:20:24 +0000 (-0700) Subject: reallyroutespline: fix unchecked failures on recursion X-Git-Tag: 5.0.0~8^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c97f01033acfd2332c9cb44f64856206db7304a;p=graphviz reallyroutespline: fix unchecked failures on recursion --- diff --git a/lib/pathplan/route.c b/lib/pathplan/route.c index ac81eabd0..163782262 100644 --- a/lib/pathplan/route.c +++ b/lib/pathplan/route.c @@ -142,9 +142,13 @@ static int reallyroutespline(Pedge_t * edges, int edgen, splitv1 = normv(sub(inps[spliti], inps[spliti - 1])); splitv2 = normv(sub(inps[spliti + 1], inps[spliti])); splitv = normv(add(splitv1, splitv2)); - reallyroutespline(edges, edgen, inps, spliti + 1, ev0, splitv); - reallyroutespline(edges, edgen, &inps[spliti], inpn - spliti, splitv, - ev1); + if (reallyroutespline(edges, edgen, inps, spliti + 1, ev0, splitv) < 0) { + return -1; + } + if (reallyroutespline(edges, edgen, &inps[spliti], inpn - spliti, splitv, + ev1) < 0) { + return -1; + } return 0; }