Do not include stdio.h before dnsmasq.h
We define some constants in dnsmasq.h, which have an influence on stdio.h. So do not include stdio.h before dnsmasq.h. Signed-off-by: Petr Menšík <pemensik@redhat.com>
This commit is contained in:
parent
6379c5b2d4
commit
d528970d82
44
dnsmasq-2.77-stdio.h.patch
Normal file
44
dnsmasq-2.77-stdio.h.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From b476faf1c4f96c093ea1a8a0c824dea9f55b665f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hesse <list@eworm.de>
|
||||||
|
Date: Mon, 25 Sep 2017 17:36:24 +0100
|
||||||
|
Subject: [PATCH] Do not include stdio.h before dnsmasq.h
|
||||||
|
|
||||||
|
We define some constants in dnsmasq.h, which have an influence on
|
||||||
|
stdio.h. So do not include stdio.h before dnsmasq.h.
|
||||||
|
---
|
||||||
|
src/dnsmasq.h | 6 ++++++
|
||||||
|
src/helper.c | 1 -
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
|
||||||
|
index 7a18898..421488b 100644
|
||||||
|
--- a/src/dnsmasq.h
|
||||||
|
+++ b/src/dnsmasq.h
|
||||||
|
@@ -16,6 +16,12 @@
|
||||||
|
|
||||||
|
#define COPYRIGHT "Copyright (c) 2000-2016 Simon Kelley"
|
||||||
|
|
||||||
|
+/* We do defines that influence behavior of stdio.h, so complain
|
||||||
|
+ if included too early. */
|
||||||
|
+#ifdef _STDIO_H
|
||||||
|
+# error "Header file stdio.h included too early!"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifndef NO_LARGEFILE
|
||||||
|
/* Ensure we can use files >2GB (log files may grow this big) */
|
||||||
|
# define _LARGEFILE_SOURCE 1
|
||||||
|
diff --git a/src/helper.c b/src/helper.c
|
||||||
|
index 4fffa27..68ce9a7 100644
|
||||||
|
--- a/src/helper.c
|
||||||
|
+++ b/src/helper.c
|
||||||
|
@@ -14,7 +14,6 @@
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include <stdio.h>
|
||||||
|
#include "dnsmasq.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_SCRIPT
|
||||||
|
--
|
||||||
|
2.9.5
|
||||||
|
|
@ -31,6 +31,7 @@ Patch6: dnsmasq-2.77-CVE-2017-14496.patch
|
|||||||
Patch7: dnsmasq-2.77-CVE-2017-14495.patch
|
Patch7: dnsmasq-2.77-CVE-2017-14495.patch
|
||||||
Patch8: dnsmasq-2.77-misc-cleanups.patch
|
Patch8: dnsmasq-2.77-misc-cleanups.patch
|
||||||
Patch9: dnsmasq-2.77-CVE-2017-14491-2.patch
|
Patch9: dnsmasq-2.77-CVE-2017-14491-2.patch
|
||||||
|
Patch10: dnsmasq-2.77-stdio.h.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -74,6 +75,7 @@ query/remove a DHCP server's leases.
|
|||||||
%patch7 -p1 -b .CVE-2017-14495
|
%patch7 -p1 -b .CVE-2017-14495
|
||||||
%patch8 -p1 -b .misc-cleanups
|
%patch8 -p1 -b .misc-cleanups
|
||||||
%patch9 -p1 -b .CVE-2017-14491-2
|
%patch9 -p1 -b .CVE-2017-14491-2
|
||||||
|
%patch10 -p1 -b .stdio.h
|
||||||
|
|
||||||
# use /var/lib/dnsmasq instead of /var/lib/misc
|
# use /var/lib/dnsmasq instead of /var/lib/misc
|
||||||
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
|
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
|
||||||
@ -168,6 +170,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
- Security fix, CVE-2017-14496, Integer underflow in DNS response creation
|
- Security fix, CVE-2017-14496, Integer underflow in DNS response creation
|
||||||
- Security fix, CVE-2017-14495, OOM in DNS response creation
|
- Security fix, CVE-2017-14495, OOM in DNS response creation
|
||||||
- Misc code cleanups arising from Google analysis
|
- Misc code cleanups arising from Google analysis
|
||||||
|
- Do not include stdio.h before dnsmasq.h
|
||||||
|
|
||||||
* Thu Sep 14 2017 Petr Menšík <pemensik@redhat.com> - 2.77-7
|
* Thu Sep 14 2017 Petr Menšík <pemensik@redhat.com> - 2.77-7
|
||||||
- Fix CVE-2017-13704
|
- Fix CVE-2017-13704
|
||||||
|
Loading…
Reference in New Issue
Block a user