Fix potential crash TCP headers were captured incompletely.

Test case provided by Jonathan Ganz.

BIT-1425 #close
This commit is contained in:
Robin Sommer 2015-08-30 18:49:05 -07:00
parent d88e6b3f1a
commit 1b9ee38e69
4 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,9 @@
# @TEST-EXEC: bro -b -r $TRACES/tcp/truncated-header.pcap %INPUT >out
# @TEST-EXEC: btest-diff out
event tcp_packet(c: connection, is_orig: bool, flags: string, seq: count, ack: count, len: count, payload: string)
{
# Just having this handler used to crash Bro on this trace.
print network_time(), c$id;
}