]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Create rrd file: Allow only short integer numbers in rpn formula 517/head
authorpetgit <mo1607bil>
Sun, 13 Jul 2014 14:24:13 +0000 (16:24 +0200)
committerpetgit <mo1607bil>
Sun, 13 Jul 2014 14:24:13 +0000 (16:24 +0200)
src/rrd_rpncalc.c

index b342ec24add1fee59af7c2c83e19995833ab2e47..bf87e6a896ffc710acbd47261b5caf534b56754c 100644 (file)
@@ -47,7 +47,7 @@ short rpn_compact(
             /* rpnp.val is a double, rpnc.val is a short */
             double    temp = floor(rpnp[i].val);
 
-            if (temp < SHRT_MIN || temp > SHRT_MAX) {
+                       if (temp < SHRT_MIN || temp > SHRT_MAX || temp != rpnp[i].val) {
                 rrd_set_error
                     ("constants must be integers in the interval (%d, %d)",
                      SHRT_MIN, SHRT_MAX);