aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-09-04 17:31:48 -0400
committerMichael Mann <mmann78@netscape.net>2017-09-05 23:11:36 +0000
commite4084f7bcdb7f05ae954d909c6dafa7a26ff631c (patch)
treebfdcac37d23cfca5b3597bdff0998f1515db5532 /wiretap
parent299bd4628a9aa8e6ea2c8772576e171f100da001 (diff)
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>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/netmon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/netmon.c b/wiretap/netmon.c
index ed35ce7256..5c7b0fd049 100644
--- a/wiretap/netmon.c
+++ b/wiretap/netmon.c
@@ -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 */