diff options
author | nectar <nectar@FreeBSD.org> | 2002-09-13 20:31:29 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-09-13 20:31:29 +0000 |
commit | 57c880964051d411ff6f58ea80ab93527222defb (patch) | |
tree | 4abdf8e587e50c215c8768bca481fe102ec47c16 /lib/libc/net/gethostbydns.c | |
parent | 413ebcf5d275744ebcbceaba55b2ab7e96701269 (diff) | |
download | FreeBSD-src-57c880964051d411ff6f58ea80ab93527222defb.zip FreeBSD-src-57c880964051d411ff6f58ea80ab93527222defb.tar.gz |
When using res_send/res_query/res_search, the caller must either
insure enough space is available for the response, or be prepared
to resize the buffer and retry as necessary.
Do the conservative thing and make sure enough space is available.
Reviewed by: silence on freebsd-audit
Diffstat (limited to 'lib/libc/net/gethostbydns.c')
-rw-r--r-- | lib/libc/net/gethostbydns.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index 1044727..479cc4a 100644 --- a/lib/libc/net/gethostbydns.c +++ b/lib/libc/net/gethostbydns.c @@ -103,11 +103,7 @@ static void addrsort(char **, int); static void dprintf(char *, int) __printflike(1, 0); #endif -#if PACKETSZ > 1024 -#define MAXPACKET PACKETSZ -#else -#define MAXPACKET 1024 -#endif +#define MAXPACKET 65536 typedef union { HEADER hdr; |