aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-24 22:29:11 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-24 22:29:11 +0000
commite2dced828ea26102bd9599acd9fc43bf944e37be (patch)
treee45f97a15d06e2f0fdc3a04d77dabb76fe436c15
parent2a56ae9f1e8b0d054aa8244897f78384caa1c1ef (diff)
downloadglibc-e2dced828ea26102bd9599acd9fc43bf944e37be.tar
glibc-e2dced828ea26102bd9599acd9fc43bf944e37be.tar.gz
glibc-e2dced828ea26102bd9599acd9fc43bf944e37be.tar.bz2
glibc-e2dced828ea26102bd9599acd9fc43bf944e37be.zip
(MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun.
-rw-r--r--resolv/gethnamaddr.c4
-rw-r--r--resolv/nss_dns/dns-host.c4
-rw-r--r--resolv/res_query.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index ed87155807..8236b144a8 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -115,10 +115,10 @@ static void map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len));
extern void addrsort __P((char **, int));
#endif
-#if PACKETSZ > 1024
+#if PACKETSZ > 65536
#define MAXPACKET PACKETSZ
#else
-#define MAXPACKET 1024
+#define MAXPACKET 65536
#endif
/* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 77441f7589..fafe3435c0 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -92,10 +92,10 @@
#define MAX_NR_ALIASES 48
#define MAX_NR_ADDRS 48
-#if PACKETSZ > 1024
+#if PACKETSZ > 65536
# define MAXPACKET PACKETSZ
#else
-# define MAXPACKET 1024
+# define MAXPACKET 65536
#endif
/* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */
#ifdef MAXHOSTNAMELEN
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 92a90d6d8a..866a2bba55 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -85,10 +85,10 @@ static const char rcsid[] = "$BINDId: res_query.c,v 8.20 2000/02/29 05:39:12 vix
/* Options. Leave them on. */
/* #undef DEBUG */
-#if PACKETSZ > 1024
+#if PACKETSZ > 65536
#define MAXPACKET PACKETSZ
#else
-#define MAXPACKET 1024
+#define MAXPACKET 65536
#endif
/*