From: Tobias Oetiker Date: Mon, 2 May 2005 19:32:49 +0000 (+0000) Subject: no infinite line width please X-Git-Tag: 1.2.2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dad39222bfa5a04a812243e30d2a5853f1452aa;p=thirdparty%2Frrdtool-1.x.git no infinite line width please git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@475 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 65bedb41..595486a1 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -60,8 +60,8 @@ rrd_parse_find_gf(char *line, unsigned int *eaten, graph_desc_t *gdp) { double width; *eaten+=i; if (sscanf(&line[*eaten],"%lf%n:",&width,&i)){ - if (width <= 0){ - rrd_set_error("LINE width is %lf. It must be >= 0 though",width); + if (width < 0 || isnan(width) || isinf(width) ){ + rrd_set_error("LINE width is %lf. It must be finite and >= 0 though",width); return 1; } gdp->linewidth=width;