]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Resize 2 statically allocated hostname buffers.
authorfenner <fenner>
Fri, 10 Nov 2000 17:52:02 +0000 (17:52 +0000)
committerfenner <fenner>
Fri, 10 Nov 2000 17:52:02 +0000 (17:52 +0000)
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

print-bgp.c

index 6675544b1b97d08f9ac3a1cbe49260a7f8ed93b4..9c062adb5a7751ee9f62cf358ac3fcfc779d742e 100644 (file)
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #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>
 #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;
        int advance;
        int tlen;
        const u_char *p;
-       char buf[256];
+       char buf[MAXHOSTNAMELEN + 100];
 
        p = dat;
 
 
        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) {
        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)
                        i = decode_prefix4(p, buf, sizeof(buf));
                        printf(" %s", buf);
                        if (i < 0)