1 From d689d14dbcd768c028eab2fb378d849e543dcfe9 Mon Sep 17 00:00:00 2001
2 From: Fred Klassen <fklassen@appneta.com>
3 Date: Sun, 26 Feb 2017 20:45:59 -0800
4 Subject: [PATCH] #278 fail if capture has a packet that is too large (#286)
6 * #278 fail if capture has a packet that is too large
8 [baruch: remove the CHANGELOG update]
9 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
11 Upstream status: upstream commit d689d14db
13 diff --git a/src/tcpcapinfo.c b/src/tcpcapinfo.c
14 index 775f1625b00f..96928820fe94 100644
15 --- a/src/tcpcapinfo.c
16 +++ b/src/tcpcapinfo.c
17 @@ -281,6 +281,15 @@ main(int argc, char *argv[])
18 caplen = pcap_ph.caplen;
22 + printf("\n\nCapture file appears to be damaged or corrupt.\n"
23 + "Contains packet of size %u, bigger than snap length %u\n",
24 + caplen, pcap_fh.snaplen);
30 /* check to make sure timestamps don't go backwards */
31 if (last_sec > 0 && last_usec > 0) {
32 if ((pcap_ph.ts.tv_sec == last_sec) ?
33 @@ -306,7 +315,7 @@ main(int argc, char *argv[])
41 /* print the frame checksum */