From 7f1bf4ed628c441482b04d0581e1cdc4c9c75a4a Mon Sep 17 00:00:00 2001 From: Tobias 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/branches/1.2/program@1691 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 0a12c057..44b2c043 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -606,6 +606,10 @@ rrd_parse_make_vname(const char *const line, unsigned int *const eaten, graph_de 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.47.2