diff options
author | he <he> | 2016-10-18 21:22:12 +0000 |
---|---|---|
committer | he <he> | 2016-10-18 21:22:12 +0000 |
commit | a4fe7d7870fbcf59e19a7ee9608abe255a7541c3 (patch) | |
tree | 96536e38a1839002a0bd88b1bf066a811745edea /databases/rrdtool/patches | |
parent | 2fdf089b78d94ff90c4fe0d8981b3264f44fa068 (diff) | |
download | pkgsrc-a4fe7d7870fbcf59e19a7ee9608abe255a7541c3.tar.gz |
Fix a signedness/unsigned conversion bug causing overflow in rrd_dump.c.
Bump PKGREVISION.
Diffstat (limited to 'databases/rrdtool/patches')
-rw-r--r-- | databases/rrdtool/patches/patch-src_rrd__dump.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/databases/rrdtool/patches/patch-src_rrd__dump.c b/databases/rrdtool/patches/patch-src_rrd__dump.c new file mode 100644 index 00000000000..bde835c88eb --- /dev/null +++ b/databases/rrdtool/patches/patch-src_rrd__dump.c @@ -0,0 +1,16 @@ +$NetBSD: patch-src_rrd__dump.c,v 1.1 2016/10/18 21:22:12 he Exp $ + +Fix a signedness / unsigned conversion bug, causing overflow +of the timestamp for all but the last sample dumped (when timer is negative). + +--- src/rrd_dump.c.orig 2016-04-19 15:52:25.000000000 +0000 ++++ src/rrd_dump.c +@@ -422,7 +422,7 @@ int rrd_dump_cb_r( + now = (rrd.live_head->last_up + - rrd.live_head->last_up + % (rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step)) +- + (timer * rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step); ++ + (timer * (long)rrd.rra_def[i].pdp_cnt * (long)rrd.stat_head->pdp_step); + + timer++; + #if HAVE_STRFTIME |