Resize 2 statically allocated hostname buffers.

This was in http://www.tcpdump.org/lists/patches/89 , and also
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-00%3A61/tcpdump-4.x.patch.v1.1
This commit is contained in:
fenner 2000-11-10 17:52:02 +00:00
parent 2576276449
commit 7a58cc284c

View File

@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.17 2000-09-29 04:58:34 guy Exp $";
"@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.18 2000-11-10 17:52:02 fenner Exp $";
#endif
#include <sys/param.h>
@ -318,7 +318,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len)
int advance;
int tlen;
const u_char *p;
char buf[256];
char buf[MAXHOSTNAMELEN + 100];
p = dat;
@ -627,7 +627,7 @@ bgp_update_print(const u_char *dat, int length)
if (dat + length > p) {
printf("(NLRI:"); /* ) */
while (dat + length > p) {
char buf[256];
char buf[MAXHOSTNAMELEN + 100];
i = decode_prefix4(p, buf, sizeof(buf));
printf(" %s", buf);
if (i < 0)