From: Guy Harris Date: Wed, 31 Jul 2013 18:33:15 +0000 (-0700) Subject: Fix potential (but not actual) buffer overflow risk. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/fd06bd7cf131a2836938fb65d76f2b57fa8573c4?ds=sidebyside Fix potential (but not actual) buffer overflow risk. The line buffer is 256 bytes long, so the name subfield in the line can't be bigger than 256 bytes, but 1) somebody could make the line buffer bigger and 2) this way the format item and buffer size match so we'll do it anyway. --- diff --git a/print-atalk.c b/print-atalk.c index 2b7b7686..a075b189 100644 --- a/print-atalk.c +++ b/print-atalk.c @@ -540,7 +540,7 @@ ataddr_string(u_short atnet, u_char athost) { register struct hnamemem *tp, *tp2; register int i = (atnet << 8) | athost; - char nambuf[256]; + char nambuf[256+1]; static int first = 1; FILE *fp;