diff options
author | sam <sam@FreeBSD.org> | 2005-07-11 03:54:22 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-07-11 03:54:22 +0000 |
commit | 1166f90fe87cef69f7923a1b8c386eecdc6cb92b (patch) | |
tree | 87e350d89f0c352cd41839a49086d78bf700350e /contrib/tcpdump/print-bootp.c | |
parent | a6836add6eafd2d06f4eeb7200e8217ba3399c1b (diff) | |
download | FreeBSD-src-1166f90fe87cef69f7923a1b8c386eecdc6cb92b.zip FreeBSD-src-1166f90fe87cef69f7923a1b8c386eecdc6cb92b.tar.gz |
Virgin import of tcpdump v3.9.1 (release) from tcpdump.org
Approved by: re (scottl)
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 e73915e..8108993 100644 --- a/contrib/tcpdump/print-bootp.c +++ b/contrib/tcpdump/print-bootp.c @@ -22,7 +22,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 @@ -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; @@ -557,16 +560,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; @@ -577,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; |