diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-04-06 18:42:39 +0100 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-06 20:00:57 +0000 |
commit | f0a2b8303a9fcd18d09e27d79bd21ac19d9da7d0 (patch) | |
tree | 62eac2ad5fb725ca6128acfdd2cf33fadb17a54e /tshark.c | |
parent | 3ba1c7ff7749a6c55a0e6155fd5c4fef6ca8644d (diff) |
Revert "Get rid of the per-capture_file wtap_rec and Buffer."
This reverts commit 9445403f9558901dc54c88754ff21795ea1803f3.
cf_select_packet frees the buffer backing the dissection result
(cf->edt) which results in use-after-frees when callers try to access
the contents. See for example this call trace:
* PacketList::selectionChanged
* cf_select_packet(cap_file_, row)
* frameSelected(row) -> ByteViewTab::selectedFrameChanged
* addTab(source_name, get_data_source_tvb(source))
get_data_source_tvb returns the buffer that backs the dissection and
must remain valid even after dissection has completed. If this is not
done, then a possibly expensive redissection must be done in order to
populate the byte view. The temporary memory savings are not worth it.
Bug: 15683
Change-Id: Ia5ec2c7736cdebbac3c5bf46a4e2470c9236262d
Reviewed-on: https://code.wireshark.org/review/32758
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
0 files changed, 0 insertions, 0 deletions