From e9b16d9c8b9bea0d0a8601f0f51c609a64f5515e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 2 Jun 2009 21:11:47 +0200 Subject: [PATCH] patches: Removed ntpd_type_pun_fix.dpatch. This patch has been included upstream. --- debian/changelog | 3 +- debian/patches/00list | 1 - debian/patches/ntpd_type_pun_fix.dpatch | 56 ------------------------- 3 files changed, 2 insertions(+), 58 deletions(-) delete mode 100755 debian/patches/ntpd_type_pun_fix.dpatch diff --git a/debian/changelog b/debian/changelog index 0b8d183..5ee8603 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,10 +4,11 @@ collectd (4.6.3-1) unstable; urgency=low * debian/patches: - Removed battery_acpi_complain.dpatch - included upstream. - Removed include_empty_files.dpatch - included upstream. + - Removed ntpd_type_pun_fix.dpatch - included upstream. * debian/rules: - Install collectd-network.py to /usr/share/doc/collectd/examples/. - -- Sebastian Harl Tue, 02 Jun 2009 21:08:34 +0200 + -- Sebastian Harl Tue, 02 Jun 2009 21:11:22 +0200 collectd (4.6.2-3) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index d28f1dc..de7db35 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,5 +1,4 @@ rrd_filter_path.dpatch collection_conf_path.dpatch -ntpd_type_pun_fix.dpatch rrdtool_uninitialized_fix.dpatch diff --git a/debian/patches/ntpd_type_pun_fix.dpatch b/debian/patches/ntpd_type_pun_fix.dpatch deleted file mode 100755 index db185cf..0000000 --- a/debian/patches/ntpd_type_pun_fix.dpatch +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## ntpd_type_pun_fix.dpatch by Florian Forster -## -## DP: ntpd plugin: Fix dereference of type-punned pointer. - -@DPATCH@ - -diff a/src/ntpd.c b/src/ntpd.c ---- a/src/ntpd.c -+++ b/src/ntpd.c -@@ -896,25 +896,33 @@ static int ntpd_read (void) - - if (ptr->v6_flag) - { -- struct sockaddr_in6 *sa_ptr; -- sa_ptr = (struct sockaddr_in6 *) &sa; -+ struct sockaddr_in6 sa6; - -- sa_ptr->sin6_family = AF_INET6; -- sa_ptr->sin6_port = htons (123); -- memcpy (&sa_ptr->sin6_addr, &ptr->srcadr6, -+ assert (sizeof (sa) >= sizeof (sa6)); -+ -+ memset (&sa6, 0, sizeof (sa6)); -+ sa6.sin6_family = AF_INET6; -+ sa6.sin6_port = htons (123); -+ memcpy (&sa6.sin6_addr, &ptr->srcadr6, - sizeof (struct in6_addr)); -- sa_len = sizeof (struct sockaddr_in6); -+ sa_len = sizeof (sa6); -+ -+ memcpy (&sa, &sa6, sizeof (sa6)); - } - else - { -- struct sockaddr_in *sa_ptr; -- sa_ptr = (struct sockaddr_in *) &sa; -+ struct sockaddr_in sa4; - -- sa_ptr->sin_family = AF_INET; -- sa_ptr->sin_port = htons (123); -- memcpy (&sa_ptr->sin_addr, &ptr->srcadr, -+ assert (sizeof (sa) >= sizeof (sa4)); -+ -+ memset (&sa4, 0, sizeof (sa4)); -+ sa4.sin_family = AF_INET; -+ sa4.sin_port = htons (123); -+ memcpy (&sa4.sin_addr, &ptr->srcadr, - sizeof (struct in_addr)); -- sa_len = sizeof (struct sockaddr_in); -+ sa_len = sizeof (sa4); -+ -+ memcpy (&sa, &sa4, sizeof (sa4)); - } - - if (do_reverse_lookups == 0) -- 2.30.2