X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/38a13e9304585a3e1b833be7a9faa37df1324e63..a5370b71fe0fdecac8a10ad2e0e5545f01f95f6e:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index d1534c7a..8217a6f2 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.79 2005-04-20 10:30:52 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.80 2005-05-06 04:19:25 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -444,7 +444,10 @@ rfc1048_print(register const u_char *bp) case 'a': /* ascii strings */ putchar('"'); - (void)fn_printn(bp, size, NULL); + if (fn_printn(bp, size, snapend)) { + putchar('"'); + goto trunc; + } putchar('"'); bp += size; size = 0; @@ -567,7 +570,10 @@ rfc1048_print(register const u_char *bp) printf("%u/%u/", *bp, *(bp+1)); bp += 2; putchar('"'); - (void)fn_printn(bp, size - 3, NULL); + if (fn_printn(bp, size - 3, snapend)) { + putchar('"'); + goto trunc; + } putchar('"'); bp += size - 3; size = 0; @@ -578,7 +584,10 @@ rfc1048_print(register const u_char *bp) size--; if (type == 0) { putchar('"'); - (void)fn_printn(bp, size, NULL); + if (fn_printn(bp, size, snapend)) { + putchar('"'); + goto trunc; + } putchar('"'); bp += size; size = 0;