From: hannes Date: Tue, 2 Mar 2004 07:45:13 +0000 (+0000) Subject: From: alex medvedev X-Git-Tag: tcpdump-3.8.2~33 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/3fbdc0f2101cd8ea904eb17a3a16dabd9a02848c From: alex medvedev catch a segfault: option 81 min size should be 4 bytes: http://sunsite.uakom.sk/doc/rfc/bootp-dhcp-option-81 --- diff --git a/print-bootp.c b/print-bootp.c index c5869304..2727e877 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.75.2.2 2003-11-16 08:51:13 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.75.2.3 2004-03-02 07:45:13 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -556,6 +556,10 @@ rfc1048_print(register const u_char *bp) break; case TAG_CLIENT_FQDN: + /* option 81 should be at least 4 bytes long */ + if (len < 4) + printf("ERROR: options 81 len %u < 4 bytes", len); + break; if (*bp++) printf("[svrreg]"); if (*bp)