From: Tobias Oetiker Date: Tue, 28 Jul 2015 15:38:59 +0000 (+0200) Subject: start reading at gdes_c - 1 or we are out of bounds X-Git-Tag: v1.5.4~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf7e152824cd249bae3d74b879b049be0d0f9407;p=thirdparty%2Frrdtool-1.x.git start reading at gdes_c - 1 or we are out of bounds --- diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 71c5a3a2..574bd449 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -1127,7 +1127,7 @@ int parse_stack(enum gf_en gf,parsedargs_t*pa,image_desc_t *const im){ gdp->stack=1; /* and try to get the one index before ourselves */ long i; - for (i=im->gdes_c;(gdp->gf==gf)&&(i>=0);i--) { + for (i=im->gdes_c-1;(gdp->gf==gf)&&(i>=0);i--) { dprintfparsed("trying to process entry %li with type %u\n",i,im->gdes[i].gf); switch (im->gdes[i].gf) { case GF_LINE: