From: oetiker Date: Tue, 22 Jul 2008 15:15:44 +0000 (+0000) Subject: Fix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef9887d4e8707407cb072e7402d302ca8a1cf86b;p=rrdtool-all.git Fix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with AVERAGE as a CF. I ran into this when specifying 0.6 as a step value, assuming floats were also accepted. Patch attached here. -- Bogdan git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1445 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_create.c b/program/src/rrd_create.c index 2cc85575..fd1ac9e8 100644 --- a/program/src/rrd_create.c +++ b/program/src/rrd_create.c @@ -373,6 +373,8 @@ int rrd_create_r( default: rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt = atoi(token); + if (atoi(token) < 1) + rrd_set_error("Invalid step: must be >= 1"); break; } break;