- Fix segfault in next_iface4() and next_iface6() (#428870)
This commit is contained in:
parent
fcaadbef6a
commit
95192934fb
29
dhcp-4.0.0-discover-file-handle.patch
Normal file
29
dhcp-4.0.0-discover-file-handle.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff -up dhcp-4.0.0/common/discover.c.fp dhcp-4.0.0/common/discover.c
|
||||||
|
--- dhcp-4.0.0/common/discover.c.fp 2008-01-15 10:25:45.000000000 -1000
|
||||||
|
+++ dhcp-4.0.0/common/discover.c 2008-01-15 10:27:08.000000000 -1000
|
||||||
|
@@ -461,6 +461,12 @@ next_iface4(struct iface_info *info, int
|
||||||
|
char *name;
|
||||||
|
struct ifreq tmp;
|
||||||
|
|
||||||
|
+ if (!ifaces->fp) {
|
||||||
|
+ log_error("Error reading interface information");
|
||||||
|
+ *err = 1;
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Loop exits when we find an interface that has an address, or
|
||||||
|
* when we run out of interfaces.
|
||||||
|
@@ -587,6 +593,12 @@ next_iface6(struct iface_info *info, int
|
||||||
|
struct sockaddr_in6 addr;
|
||||||
|
struct ifreq tmp;
|
||||||
|
|
||||||
|
+ if (!ifaces->fp6) {
|
||||||
|
+ log_error("Error reading interface information");
|
||||||
|
+ *err = 1;
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
do {
|
||||||
|
/*
|
||||||
|
* Read the next line in the file.
|
@ -4,7 +4,7 @@
|
|||||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.0.0
|
Version: 4.0.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer made
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer made
|
||||||
# incorrect use of the epoch and that's why it is at 12 now. It should have
|
# incorrect use of the epoch and that's why it is at 12 now. It should have
|
||||||
# never been used, but it was. So we are stuck with it.
|
# never been used, but it was. So we are stuck with it.
|
||||||
@ -42,6 +42,7 @@ Patch13: %{name}-4.0.0-dhclient-anycast.patch
|
|||||||
Patch14: %{name}-4.0.0-manpages.patch
|
Patch14: %{name}-4.0.0-manpages.patch
|
||||||
Patch15: %{name}-4.0.0-paths.patch
|
Patch15: %{name}-4.0.0-paths.patch
|
||||||
Patch16: %{name}-4.0.0-libdhcp4client.patch
|
Patch16: %{name}-4.0.0-libdhcp4client.patch
|
||||||
|
Patch17: %{name}-4.0.0-discover-file-handle.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -188,6 +189,9 @@ client library.
|
|||||||
# Add the libdhcp4client target (library version of dhclient)
|
# Add the libdhcp4client target (library version of dhclient)
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
|
|
||||||
|
# Check file handle passed to fgets() in common/discover.c
|
||||||
|
%patch17 -p1
|
||||||
|
|
||||||
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
||||||
%{__install} -p -m 0644 %{SOURCE5} .
|
%{__install} -p -m 0644 %{SOURCE5} .
|
||||||
%{__install} -p -m 0644 %{SOURCE6} doc/
|
%{__install} -p -m 0644 %{SOURCE6} doc/
|
||||||
@ -400,6 +404,9 @@ fi
|
|||||||
%{_libdir}/libdhcp4client.so
|
%{_libdir}/libdhcp4client.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 15 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-3
|
||||||
|
- Fix segfault in next_iface4() and next_iface6() (#428870)
|
||||||
|
|
||||||
* Mon Jan 14 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-2
|
* Mon Jan 14 2008 David Cantrell <dcantrell@redhat.com> - 12:4.0.0-2
|
||||||
- -fvisibility fails me again
|
- -fvisibility fails me again
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user