Ensure process info offset is "seek"ed when process info exists in NetMon file.

Change-Id: I85fd990781a47e738c22bff0218aabdc04122e15
Reviewed-on: https://code.wireshark.org/review/23403
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2017-09-04 17:31:48 -04:00
parent 299bd4628a
commit e4084f7bcd
1 changed files with 5 additions and 0 deletions

View File

@ -591,6 +591,11 @@ wtap_open_return_val netmon_open(wtap *wth, int *err, gchar **err_info)
if ((process_info_table_offset > 0) && (process_info_table_count > 0)) {
guint16 version;
/* Go to the process table offset */
if (file_seek(wth->fh, process_info_table_offset, SEEK_SET, err) == -1) {
return WTAP_OPEN_ERROR;
}
process_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, netmonrec_process_info_destroy);
if (process_info_table == NULL) {
*err = ENOMEM; /* we assume we're out of memory */