pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/rrdtool Fix a signedness/unsigned conversion...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/827f8172e1e0
branches:  trunk
changeset: 354020:827f8172e1e0
user:      he <he%pkgsrc.org@localhost>
date:      Tue Oct 18 21:22:12 2016 +0000

description:
Fix a signedness/unsigned conversion bug causing overflow in rrd_dump.c.
Bump PKGREVISION.

diffstat:

 databases/rrdtool/Makefile                      |   4 ++--
 databases/rrdtool/distinfo                      |   3 ++-
 databases/rrdtool/patches/patch-src_rrd__dump.c |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 1e134acb7c6c -r 827f8172e1e0 databases/rrdtool/Makefile
--- a/databases/rrdtool/Makefile        Tue Oct 18 21:16:22 2016 +0000
+++ b/databases/rrdtool/Makefile        Tue Oct 18 21:22:12 2016 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.124 2016/08/27 06:42:43 dholland Exp $
+# $NetBSD: Makefile,v 1.125 2016/10/18 21:22:12 he Exp $
 #
 # Please, also update databases/ruby-rrdtool
 
 DISTNAME=      rrdtool-1.6.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    databases graphics net
 MASTER_SITES=  http://oss.oetiker.ch/rrdtool/pub/
 
diff -r 1e134acb7c6c -r 827f8172e1e0 databases/rrdtool/distinfo
--- a/databases/rrdtool/distinfo        Tue Oct 18 21:16:22 2016 +0000
+++ b/databases/rrdtool/distinfo        Tue Oct 18 21:22:12 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.52 2016/08/27 07:40:22 dholland Exp $
+$NetBSD: distinfo,v 1.53 2016/10/18 21:22:12 he Exp $
 
 SHA1 (rrdtool-1.6.0.tar.gz) = 9866b41bda9416188f236d61d24f185b173fd571
 RMD160 (rrdtool-1.6.0.tar.gz) = 90bb6dc4a19c296fb67bb83094f6308396e591c0
@@ -11,6 +11,7 @@
 SHA1 (patch-bindings_perl-shared_Makefile.PL) = f3b86e68a023ec9da5d600c8f803c93820195d53
 SHA1 (patch-src_gettext.h) = 1254beedc267d901e154ea98599bdfddbe49ddc0
 SHA1 (patch-src_rrd__cgi.c) = 2ea93cf6cd084638e9ae720fcb9c503631d31413
+SHA1 (patch-src_rrd__dump.c) = b42add89a7c1e410c2a5ec8a714dba21a446d125
 SHA1 (patch-src_rrd__graph.c) = 799c5a666661054e4c32b8ed02cc09f2262dae03
 SHA1 (patch-src_rrd__restore.c) = e10312901fd6edfdcaf7cce932eb434cce8ef771
 SHA1 (patch-src_rrd__strtod.c) = 49ed57170777b8bcbd7c4e700c1f54d74e3a3a72
diff -r 1e134acb7c6c -r 827f8172e1e0 databases/rrdtool/patches/patch-src_rrd__dump.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__dump.c   Tue Oct 18 21:22:12 2016 +0000
@@ -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



Home | Main Index | Thread Index | Old Index