summaryrefslogtreecommitdiff
path: root/wiretap/tnef.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/tnef.c')
-rw-r--r--wiretap/tnef.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wiretap/tnef.c b/wiretap/tnef.c
index 591a2f50dc..3afd1d49d6 100644
--- a/wiretap/tnef.c
+++ b/wiretap/tnef.c
@@ -109,7 +109,9 @@ int tnef_open(wtap *wth, int *err, gchar **err_info)
bytes_read = file_read(&magic, sizeof magic, wth->fh);
if (bytes_read != sizeof magic) {
*err = file_error(wth->fh, err_info);
- return (*err != 0) ? -1 : 0;
+ if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
+ return -1;
+ return 0;
}
if (htolel(magic) != TNEF_SIGNATURE)