Fix presumed cut-and-pasteo.

On errors *other* than a short read, we were driving on and processing
the non-data that we didn't read.

Change-Id: I6289ddf31ff7896918a030af9d1261bdc194e7d3
Reviewed-on: https://code.wireshark.org/review/4270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2014-09-23 17:09:46 -07:00
parent 31e86998fb
commit 5f096acb45
1 changed files with 2 additions and 3 deletions

View File

@ -870,10 +870,9 @@ process_header_records(wtap *wth, int *err, gchar **err_info, gint16 maj_vers,
wth->fh);
if (bytes_read != bytes_to_read) {
*err = file_error(wth->fh, err_info);
if (*err == 0) {
if (*err == 0)
*err = WTAP_ERR_SHORT_READ;
return -1;
}
return -1;
}
switch (maj_vers) {