Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c5d5c99d1 | ||
|
|
3bdb0d0f80 |
2 changed files with 38 additions and 1 deletions
32
omping-001-getifaddrs-may-return-NULL-ifa_addr.patch
Normal file
32
omping-001-getifaddrs-may-return-NULL-ifa_addr.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
From 220749b10250154f95aa05c8b948cbe7015a2daa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Friesse <jfriesse@redhat.com>
|
||||||
|
Date: Thu, 14 Apr 2011 13:53:08 +0200
|
||||||
|
Subject: [PATCH] getifaddrs may return NULL ifa_addr
|
||||||
|
|
||||||
|
Such ifa_addr is then dereferenced to find out address family.
|
||||||
|
Proper check is added now.
|
||||||
|
|
||||||
|
Resolves: tt#31
|
||||||
|
---
|
||||||
|
addrfunc.c | 5 +++--
|
||||||
|
1 files changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/addrfunc.c b/addrfunc.c
|
||||||
|
index d6aa3cb..77fac4c 100644
|
||||||
|
--- a/addrfunc.c
|
||||||
|
+++ b/addrfunc.c
|
||||||
|
@@ -260,8 +260,9 @@ af_find_local_ai(const struct ai_list *ai_list, int *ip_ver, struct ifaddrs **if
|
||||||
|
TAILQ_FOREACH(aip, ai_list, entries) {
|
||||||
|
for (ai_i = aip->ai; ai_i != NULL; ai_i = ai_i->ai_next) {
|
||||||
|
for (ifa_i = ifa; ifa_i != NULL; ifa_i = ifa_i->ifa_next) {
|
||||||
|
- if (ifa_i->ifa_addr->sa_family != AF_INET &&
|
||||||
|
- ifa_i->ifa_addr->sa_family != AF_INET6) {
|
||||||
|
+ if (ifa_i->ifa_addr == NULL ||
|
||||||
|
+ (ifa_i->ifa_addr->sa_family != AF_INET &&
|
||||||
|
+ ifa_i->ifa_addr->sa_family != AF_INET6)) {
|
||||||
|
continue ;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.3.4
|
||||||
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
Name: omping
|
Name: omping
|
||||||
Version: 0.0.2
|
Version: 0.0.2
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Utility to test IP multicast functionality
|
Summary: Utility to test IP multicast functionality
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
License: ISC
|
License: ISC
|
||||||
URL: http://fedorahosted.org/omping/
|
URL: http://fedorahosted.org/omping/
|
||||||
Source0: http://fedorahosted.org/releases/o/m/omping/%{name}-%{version}.tar.gz
|
Source0: http://fedorahosted.org/releases/o/m/omping/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: omping-001-getifaddrs-may-return-NULL-ifa_addr.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -14,6 +15,7 @@ primarily in local network.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags}"
|
make %{?_smp_mflags} CFLAGS="%{optflags}"
|
||||||
|
|
@ -32,6 +34,9 @@ rm -rf %{buildroot}
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 14 2011 Jan Friesse <jfriesse@redhat.com> - 0.0.2-3
|
||||||
|
- Resolves rhbz#696509
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2-2
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue