From 4abfc131499fcfe8ae0e85a3abda6dc20a10515c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=BCxen?= Date: Tue, 25 Dec 2012 17:45:04 +0000 Subject: [PATCH] Clear preamble if no timespec is given. svn path=/trunk/; revision=46738 --- text2pcap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/text2pcap.c b/text2pcap.c index c2c342fa30..e1952e3acc 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -901,8 +901,11 @@ parse_preamble (void) * If no "-t" flag was specified, don't attempt to parse a packet * preamble to extract a time stamp. */ - if (ts_fmt == NULL) + if (ts_fmt == NULL) { + /* Clear Preamble */ + packet_preamble_len = 0; return; + } /* * Initialize to today localtime, just in case not all fields