aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2011-07-20 12:24:41 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2011-07-20 12:24:41 +0000
commit961822ef268a71d000c13ffe7e325fae6eac7f99 (patch)
treea157b279cb391420add9a8ab1cea75c8ae818839 /editcap.c
parent7056c77df43c6d159c7de4d0ee1dc82aa832a590 (diff)
Don't sanity-check snaplen against frame length if snaplen is 0.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38132 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editcap.c b/editcap.c
index 8481e73673..7a3363ad7b 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1444,7 +1444,7 @@ main(int argc, char *argv[])
}
}
- if(phdr->caplen > wtap_snapshot_length(wth)) {
+ if((wtap_snapshot_length(wth) != 0) && (phdr->caplen > wtap_snapshot_length(wth))) {
fprintf(stderr, "Warning: packet %d too big for file type, skipping it...\n", count);
count++;
continue;