Catch CDEF:tot= and raise and error to fix #199. Thanks to Jeron Massar for reporting...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 4 Dec 2008 09:03:48 +0000 (09:03 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 4 Dec 2008 09:03:48 +0000 (09:03 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1691 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_graph_helper.c

index b5be2ef..456ab95 100644 (file)
@@ -862,6 +862,10 @@ int rrd_parse_make_vname(
         rrd_set_error("Cannot parse vname from '%s'", line);
         return 1;
     }
         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) {
     dprintf("- found candidate '%s'\n", tmpstr);
 
     if ((gdp->vidx = find_var(im, tmpstr)) >= 0) {