diff options
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/5views.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wiretap/5views.c b/wiretap/5views.c index 538402f4ba..48d0c7a750 100644 --- a/wiretap/5views.c +++ b/wiretap/5views.c @@ -243,7 +243,7 @@ _5views_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) static gboolean _5views_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, - Buffer *buf, int length, int *err, gchar **err_info) + Buffer *buf, int length _U_, int *err, gchar **err_info) { t_5VW_TimeStamped_Header TimeStamped_Header; @@ -254,13 +254,16 @@ _5views_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, * Read the header. */ if (!_5views_read_header(wth, wth->random_fh, &TimeStamped_Header, - phdr, err, err_info)) + phdr, err, err_info)) { + if (*err == 0) + *err = WTAP_ERR_SHORT_READ; return FALSE; + } /* * Read the packet data. */ - return wtap_read_packet_bytes(wth->random_fh, buf, length, + return wtap_read_packet_bytes(wth->random_fh, buf, phdr->caplen, err, err_info); } |