diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2009-06-27 18:50:13 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2009-06-27 18:50:13 +0000 |
commit | 7a728f67222addea9d54207e648c20b313070806 (patch) | |
tree | 7380ce55b55e7b03517dc3da9e7d57d5d1655cfb /wiretap | |
parent | ce11d99c12804fa5c7571c920292f73887528035 (diff) |
Accept file snaplen larger than WTAP_MAX_PACKET_SIZE,
text2pcap uses 102400.
This fixes bug 3620. Thanks to Tyson Key for reporting the bug
and providing capture files.
This fix should be included in Wireshark 1.2.1 and higher.
svn path=/trunk/; revision=28866
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/pcapng.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index 0cd6a127be..88d9ada5f5 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -527,14 +527,14 @@ pcapng_read_if_descr_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn, wtap_encap_string(wtap_pcap_encap_to_wtap_encap(wblock->data.if_descr.link_type)), wblock->data.if_descr.snap_len); - /* XXX - sanity check of snapshot length */ - /* XXX - while a very big snapshot length is valid, it's more likely that it's a bug in the file */ - /* XXX - so do a sanity check for now, it's likely e.g. a byte swap order problem */ if (wblock->data.if_descr.snap_len > WTAP_MAX_PACKET_SIZE) { - pcapng_debug1("pcapng_read_if_descr_block: snapshot length %u unrealistic", + /* This is unrealisitic, but text2pcap currently uses 102400. + * We do not use this value, maybe we should check the + * snap_len of the packets against it. For now, only warn. + */ + pcapng_debug1("pcapng_read_if_descr_block: snapshot length %u unrealistic.", wblock->data.if_descr.snap_len); - /*wblock->data.if_descr.snap_len = 65535;*/ - return 0; + /*wblock->data.if_descr.snap_len = WTAP_MAX_PACKET_SIZE;*/ } /* Option defaults */ |