diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-05-16 10:50:03 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-05-16 18:27:06 +0000 |
commit | 576f33fffd4384d869ae516aa3f346d2ce0b4c6b (patch) | |
tree | cdcf476abff8ae63fa315260306822022decb2f7 /wiretap/pcapng.c | |
parent | a68627ae96994ce56fd4ff9e7255cd0104851abe (diff) |
In pcapng_open(), don't use the local pcapng_t once we know it's a pcapng file.
Use the local one *only* while we're trying to determine whether we have
a pcapng file or not; once we know we have a pcapng file, and have
allocated a pcapng_t and attached it to the wtap structure, pass *that*
one to pcapng_read_block(), so if it changes anything in the pcapng_t,
it changes the one we're using.
Change-Id: I53b32595276be97957a0b6056171471878fa40c4
Reviewed-on: https://code.wireshark.org/review/33226
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/pcapng.c')
-rw-r--r-- | wiretap/pcapng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index e6b7e46f0e..7aa5b6a29b 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -2774,7 +2774,7 @@ pcapng_open(wtap *wth, int *err, gchar **err_info) if (bh.block_type != BLOCK_TYPE_IDB) { break; /* No more IDB:s */ } - if (pcapng_read_block(wth, wth->fh, &pn, &wblock, err, err_info) != PCAPNG_BLOCK_OK) { + if (pcapng_read_block(wth, wth->fh, pcapng, &wblock, err, err_info) != PCAPNG_BLOCK_OK) { wtap_block_free(wblock.block); if (*err == 0) { pcapng_debug("No more IDBs available..."); |