Code

Fix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 22 Jul 2008 15:15:44 +0000 (15:15 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 22 Jul 2008 15:15:44 +0000 (15:15 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1445 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_create.c

index 2cc8557553f87911fb8bc87510191b1cc927f8c3..fd1ac9e8846078936b54d288c1a4b61793366bc7 100644 (file)
@@ -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;