]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bgp.c
Use a sizeof() in bgp_rt_prefix_print(). [skip ci]
[tcpdump] / print-bgp.c
index 0a09d9c246b144712faad832fa548d5fbc2affa7..cf06c83732e62348292f8a3c6e85643efe2488ed 100644 (file)
@@ -915,7 +915,7 @@ bgp_rt_prefix_print(netdissect_options *ndo,
                     u_int plen)
 {
     /* allocate space for the largest possible string */
-    char rtc_prefix_in_hex[20] = "";
+    char rtc_prefix_in_hex[sizeof("0000 0000 0000 0000")] = "";
     u_int rtc_prefix_in_hex_len = 0;
     static char output[61]; /* max response string */
     /* allocate space for the largest possible string */