summaryrefslogtreecommitdiff
path: root/wiretap/commview.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-12-26 12:01:14 +0000
committerGuy Harris <guy@alum.mit.edu>2012-12-26 12:01:14 +0000
commitb467ecfc8b5920e9676a7df034c46b0441b1cf0b (patch)
tree9a630a42002094a53660e436cfc885a8609f3f42 /wiretap/commview.c
parent1825519526807c3eb851ee83ce8f5aed50f48d36 (diff)
downloadwireshark-b467ecfc8b5920e9676a7df034c46b0441b1cf0b.tar.gz
If the attempt to read the record header fails because we hit the EOF,
treat that as "this isn't a CommView file" rather than "this is a bad file". svn path=/trunk/; revision=46774
Diffstat (limited to 'wiretap/commview.c')
-rw-r--r--wiretap/commview.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wiretap/commview.c b/wiretap/commview.c
index f84153791b..5fe51ea8b5 100644
--- a/wiretap/commview.c
+++ b/wiretap/commview.c
@@ -95,8 +95,13 @@ int commview_open(wtap *wth, int *err, gchar **err_info)
{
commview_header_t cv_hdr;
- if(!commview_read_header(&cv_hdr, wth->fh, err, err_info))
+ if(!commview_read_header(&cv_hdr, wth->fh, err, err_info)) {
+ if (*err == 0 || *err == WTAP_ERR_SHORT_READ) {
+ /* This just means "not CommView" */
+ return 0;
+ }
return -1;
+ }
/* If any of these fields do not match what we expect, bail out. */
if(cv_hdr.version != 0 ||