X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_graph_helper.c;h=595486a193388c91241b1e492610ed0bb308c8c5;hb=7e9d021d4b981dd1017e4e36617b5b60005582f3;hp=65bedb41f11100f066f2ebe91e145332c8a455bd;hpb=ab384eb6dac85f5f57dabcfc16114fcaf79d5e94;p=rrdtool.git diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 65bedb4..595486a 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;