aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2011-07-20 12:24:41 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2011-07-20 12:24:41 +0000
commit3a88c5c7dd96d3dcbde00e221e35e6f7d76053fd (patch)
treea157b279cb391420add9a8ab1cea75c8ae818839 /editcap.c
parent7d7f7d870e35df50aa1f2b6c5928e99d707cbb25 (diff)
Don't sanity-check snaplen against frame length if snaplen is 0.
svn path=/trunk/; revision=38132
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;