Code

patches: Added rrdtool_uninitialized_fix.dpatch.
authorSebastian Harl <sh@tokkee.org>
Fri, 29 May 2009 11:39:30 +0000 (13:39 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 29 May 2009 11:39:30 +0000 (13:39 +0200)
This is an upstream patch to fix an uninitialized value warning in the rrdtool
plugin, thanks to Andreas Moog for reporting this.

debian/changelog
debian/patches/rrdtool_uninitialized_fix.dpatch [new file with mode: 0755]

index d0a87d3b70e5b454c915b001fbd367cb97324556..8048bdbad162fc808e57dec0626a60ad0926fdde 100644 (file)
@@ -10,6 +10,9 @@ collectd (4.6.2-2) unstable; urgency=low
     - Added include_empty_files.dpatch - upstream patch to fix the inclusion
       of empty configuration files, thanks to Alexander Wirt for reporting
       this.
+    - Added rrdtool_uninitialized_fix.dpatch - upstream patch to fix an
+      uninitialized value warning in the rrdtool plugin, thanks to Andreas
+      Moog for reporting this.
   * debian/collectd.conf, debian/filters.conf:
     - Added a sample filter chain configuration.
   * debian/rules:
@@ -22,7 +25,7 @@ collectd (4.6.2-2) unstable; urgency=low
       libiptc which is available as shared library since iptables 1.4.3.
       Depend on versions >= 1.4.3.2-2 because of #524766.
 
- -- Sebastian Harl <sh@tokkee.org>  Thu, 28 May 2009 16:23:01 +0200
+ -- Sebastian Harl <sh@tokkee.org>  Fri, 29 May 2009 13:38:13 +0200
 
 collectd (4.6.2-1) unstable; urgency=low
 
diff --git a/debian/patches/rrdtool_uninitialized_fix.dpatch b/debian/patches/rrdtool_uninitialized_fix.dpatch
new file mode 100755 (executable)
index 0000000..1f13a41
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rrdtool_uninitialized_fix.dpatch by Florian Forster <octo@verplant.org>
+##
+## DP: rrdtool plugin: Make absolutely sure two local variables are
+## DP: initialized.
+
+@DPATCH@
+
+diff a/src/rrdtool.c b/src/rrdtool.c
+--- a/src/rrdtool.c
++++ b/src/rrdtool.c
+@@ -624,6 +624,9 @@ static void *rrd_queue_thread (void *data)
+               int    status;
+               int    i;
++              values = NULL;
++              values_num = 0;
++
+                 pthread_mutex_lock (&queue_lock);
+                 /* Wait for values to arrive */
+                 while (true)