From cf7e152824cd249bae3d74b879b049be0d0f9407 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Tue, 28 Jul 2015 17:38:59 +0200 Subject: [PATCH] start reading at gdes_c - 1 or we are out of bounds --- src/rrd_graph_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.47.2