handle integer overflow in isc_time_secondsastimet more gracefully
(#247856)
This commit is contained in:
parent
9c2a844c6c
commit
f3718dfd1b
24
bind-9.5-overflow.patch
Normal file
24
bind-9.5-overflow.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -up bind-9.5.0a5/lib/isc/pthreads/condition.c.overflow bind-9.5.0a5/lib/isc/pthreads/condition.c
|
||||
--- bind-9.5.0a5/lib/isc/pthreads/condition.c.overflow 2007-07-17 07:53:59.000000000 +0200
|
||||
+++ bind-9.5.0a5/lib/isc/pthreads/condition.c 2007-07-17 07:55:08.000000000 +0200
|
||||
@@ -43,7 +43,7 @@ isc_condition_waituntil(isc_condition_t
|
||||
* POSIX defines a timespec's tv_sec as time_t.
|
||||
*/
|
||||
result = isc_time_secondsastimet(t, &ts.tv_sec);
|
||||
- if (result != ISC_R_SUCCESS)
|
||||
+ if (result != ISC_R_RANGE && result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/*!
|
||||
diff -up bind-9.5.0a5/lib/isc/unix/time.c.overflow bind-9.5.0a5/lib/isc/unix/time.c
|
||||
--- bind-9.5.0a5/lib/isc/unix/time.c.overflow 2007-02-14 01:27:27.000000000 +0100
|
||||
+++ bind-9.5.0a5/lib/isc/unix/time.c 2007-07-17 07:53:08.000000000 +0200
|
||||
@@ -379,6 +379,9 @@ isc_time_secondsastimet(const isc_time_t
|
||||
* (Let's hope the compiler got the actual test right.)
|
||||
*/
|
||||
UNUSED(i);
|
||||
+
|
||||
+ /* Means that t->seconds > maximum value in time_t and we have int time_t */
|
||||
+ seconds = INT_MAX;
|
||||
return (ISC_R_RANGE);
|
||||
}
|
@ -16,7 +16,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||
Name: bind
|
||||
License: BSD-like
|
||||
Version: 9.5.0a5
|
||||
Release: 2.1%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 31
|
||||
Url: http://www.isc.org/products/BIND/
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -56,6 +56,7 @@ Patch52: bind-9.3.3-edns.patch
|
||||
Patch63: bind-9.4.0-dnssec-directory.patch
|
||||
Patch69: bind-9.5.0-generate-xml.patch
|
||||
Patch70: bind-9.5.0-errno-init.patch
|
||||
Patch71: bind-9.5-overflow.patch
|
||||
|
||||
# SDB patches
|
||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||
@ -264,6 +265,7 @@ pushd contrib/idn
|
||||
popd
|
||||
%patch65 -p1 -b .idn
|
||||
%patch70 -p1 -b .errno-init
|
||||
%patch71 -p1 -b .overflow
|
||||
:;
|
||||
|
||||
|
||||
@ -701,7 +703,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jul 16 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-2.1.fc8
|
||||
* Tue Jul 17 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-3.fc8
|
||||
- handle integer overflow in isc_time_secondsastimet function gracefully (#247856)
|
||||
|
||||
* Mon Jul 16 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-2.2.fc8
|
||||
- moved chroot configfiles into chroot subpackage (#248306)
|
||||
|
||||
* Thu Jul 02 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-2.fc8
|
||||
|
Loading…
Reference in New Issue
Block a user