diff options
Diffstat (limited to 'contrib/tcpdump/print-bootp.c')
-rw-r--r-- | contrib/tcpdump/print-bootp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/contrib/tcpdump/print-bootp.c b/contrib/tcpdump/print-bootp.c index 9fe96d7..844aecc 100644 --- a/contrib/tcpdump/print-bootp.c +++ b/contrib/tcpdump/print-bootp.c @@ -24,7 +24,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.78 2004/03/02 07:38:10 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.78.2.2 2005/05/06 04:19:39 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -446,7 +446,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; @@ -559,16 +562,20 @@ rfc1048_print(register const u_char *bp) case TAG_CLIENT_FQDN: /* option 81 should be at least 4 bytes long */ - if (len < 4) + if (len < 4) { printf("ERROR: options 81 len %u < 4 bytes", len); break; + } if (*bp++) printf("[svrreg]"); if (*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; @@ -579,7 +586,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; |