summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9f602e)
raw | patch | inline | side by side (parent: a9f602e)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Jul 2008 14:16:14 +0000 (16:16 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Jul 2008 14:16:14 +0000 (16:16 +0200) |
Use sstrncpy() instead of strcpy() which is poisoned in collectd.h.
debian/changelog | patch | blob | history | |
debian/patches/00list | patch | blob | history | |
debian/patches/myplugin_strcpy.dpatch | [new file with mode: 0755] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index cab9a417989f6c280f38b5203e121bac5d5bcb8d..e703729f881654db91281f19d80a16e868068dd0 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
- Added libconfig-general-perl to the suggested packages.
* README.Debian: Added a note about how to get collectd2html.pl working with
version 4 of collectd.
+ * Added debian/patches/myplugin_strcpy.dpatch - use sstrncpy() instead of
+ strcpy() which is poisoned in collectd.h.
- -- Sebastian Harl <sh@tokkee.org> Fri, 25 Jul 2008 15:44:43 +0200
+ -- Sebastian Harl <sh@tokkee.org> Fri, 25 Jul 2008 16:14:22 +0200
collectd (4.4.1-2) unstable; urgency=low
diff --git a/debian/patches/00list b/debian/patches/00list
index 332b35c8333c22b54c6ead8e9d0f6750c3bfbc7f..5c012942f2cf9e6df557979637e2061385948849 100644 (file)
--- a/debian/patches/00list
+++ b/debian/patches/00list
rrd_filter_path.dpatch
collection_conf_path.dpatch
+myplugin_strcpy.dpatch
diff --git a/debian/patches/myplugin_strcpy.dpatch b/debian/patches/myplugin_strcpy.dpatch
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## myplugin_strcpy.dpatch by Sebastian Harl <sh@tokkee.org>
+##
+## DP: examples/myplugin.c: Use sstrncpy instead of strcpy.
+
+@DPATCH@
+
+diff a/contrib/examples/myplugin.c b/contrib/examples/myplugin.c
+--- a/contrib/examples/myplugin.c
++++ b/contrib/examples/myplugin.c
+@@ -98,8 +98,8 @@ static int my_read (void)
+ vl.values = values;
+ vl.values_len = 1;
+ vl.time = time (NULL);
+- strcpy (vl.host, hostname_g);
+- strcpy (vl.plugin, "myplugin");
++ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
++ sstrncpy (vl.plugin, "myplugin", sizeof (vl.plugin));
+ /* optionally set vl.plugin_instance and vl.type_instance to reasonable
+ * values (default: "") */
+