diff options
Diffstat (limited to 'resolv/gethnamaddr.c')
-rw-r--r-- | resolv/gethnamaddr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index f2def79e24..49aea2a719 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -123,6 +123,12 @@ static void addrsort __P((char **, int)); #define MAXPACKET 1024 #endif +/* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */ +#ifdef MAXHOSTNAMELEN +# undef MAXHOSTNAMELEN +#endif +#define MAXHOSTNAMELEN 256 + typedef union { HEADER hdr; u_char buf[MAXPACKET]; |