From 73853cf6c03e32a6290a7ca9ea63172cc2084a2d Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 4 Dec 2008 09:03:48 +0000 Subject: [PATCH] Catch CDEF:tot= and raise and error to fix #199. Thanks to Jeron Massar for reporting this. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1691 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/program/src/rrd_graph_helper.c b/program/src/rrd_graph_helper.c index b5be2ef9..456ab95b 100644 --- a/program/src/rrd_graph_helper.c +++ b/program/src/rrd_graph_helper.c @@ -862,6 +862,10 @@ int rrd_parse_make_vname( rrd_set_error("Cannot parse vname from '%s'", line); return 1; } + if (line[*eaten+i] == '\0') { + rrd_set_error("String ends after the = sign on '%s'", line); + return 1; + } dprintf("- found candidate '%s'\n", tmpstr); if ((gdp->vidx = find_var(im, tmpstr)) >= 0) { -- 2.30.2