From 9e811f63b551c12653312b78d656dee51f572a4eab88e4b063161aa57a1d57c1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 21 Apr 2007 23:00:50 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nss-mdns?expand=0&rev=2 --- nss-mdns.changes | 5 +++++ nss-mdns.spec | 8 ++++++-- unaligned.diff | 11 +++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 unaligned.diff diff --git a/nss-mdns.changes b/nss-mdns.changes index 4ea9f3e..2ed5d4a 100644 --- a/nss-mdns.changes +++ b/nss-mdns.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 21 10:51:20 CEST 2007 - schwab@suse.de + +- Fix unaligned access. + ------------------------------------------------------------------- Tue Feb 20 17:58:09 CET 2007 - sbrabec@suse.cz diff --git a/nss-mdns.spec b/nss-mdns.spec index 8513a91..64d40ea 100644 --- a/nss-mdns.spec +++ b/nss-mdns.spec @@ -14,12 +14,13 @@ Name: nss-mdns # lynx is not needed, text version of README is already present #BuildRequires: lynx Version: 0.9 -Release: 1 +Release: 8 Group: Productivity/Networking/DNS/Utilities -License: GNU General Public License (GPL) +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) URL: http://0pointer.de/lennart/projects/nss-mdns/ Summary: Host Name Resolution via Multicast DNS (Zeroconf) for glibc Source: %{name}-%{version}.tar.bz2 +Patch: unaligned.diff AutoReqProv: on PreReq: sed grep Requires: avahi @@ -48,6 +49,7 @@ Authors: %prep %setup -q +%patch %build %configure --libdir=/%{_lib} @@ -115,5 +117,7 @@ sed -i "/^hosts:/{$REMOVE_REGEXP}" etc/nsswitch.conf rm -rf $RPM_BUILD_ROOT %changelog +* Sat Apr 21 2007 - schwab@suse.de +- Fix unaligned access. * Tue Feb 20 2007 - sbrabec@suse.cz - New SuSE package, version 0.9. diff --git a/unaligned.diff b/unaligned.diff new file mode 100644 index 0000000..455a9d1 --- /dev/null +++ b/unaligned.diff @@ -0,0 +1,11 @@ +--- src/nss.c ++++ src/nss.c +@@ -620,7 +620,7 @@ + #ifdef MDNS_MINIMAL + + /* Only query for 169.254.0.0/16 IPv4 in minimal mode */ +- if ((af == AF_INET && ((ntohl(*(const uint32_t*) addr) & 0xFFFF0000UL) != 0xA9FE0000UL)) || ++ if ((af == AF_INET && !(((const uint8_t*) addr)[0] == 169 && (((const uint8_t*) addr)[1] == 254))) || + (af == AF_INET6 && !(((const uint8_t*) addr)[0] == 0xFE && (((const uint8_t*) addr)[1] >> 6) == 2))) { + + *errnop = EINVAL;