Don't sanity-check snaplen against frame length if snaplen is 0.

svn path=/trunk/; revision=38132
This commit is contained in:
Martin Mathieson 2011-07-20 12:24:41 +00:00
parent 7d7f7d870e
commit 3a88c5c7dd
1 changed files with 1 additions and 1 deletions

View File

@ -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;