diff options
author | hannes <hannes> | 2004-03-02 07:38:10 +0000 |
---|---|---|
committer | hannes <hannes> | 2004-03-02 07:38:10 +0000 |
commit | 544802f1839926d09f6d15743df54f206b6d7990 (patch) | |
tree | 916e469744ddf8a9dd743d9a20d7b87d4d77fb95 /print-bootp.c | |
parent | 26b6a748750dfa0f6af44fc2de28f48a564dd875 (diff) | |
download | tcpdump-544802f1839926d09f6d15743df54f206b6d7990.tar.gz |
From: alex medvedev <alexm@pycckue.org>
catch a segfault:
option 81 min size should be 4 bytes:
http://sunsite.uakom.sk/doc/rfc/bootp-dhcp-option-81
Diffstat (limited to 'print-bootp.c')
-rw-r--r-- | print-bootp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/print-bootp.c b/print-bootp.c index 410bde37..cde86456 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.77 2003-11-16 09:36:15 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.78 2004-03-02 07:38:10 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) |