aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-06-09 08:31:29 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-06-09 15:07:50 +0000
commit81c3ade8a344dce8081ef56725fb48e5d02a5589 (patch)
tree6de1e7bf325222041a423e1ab8d3d468121ad762 /ui/qt/byte_view_tab.cpp
parent670002cab69f94dcff72fe58bc609986a7dc0d13 (diff)
Qt: Remove now unnecessary, crash-prone ByteViewTab tvb_memeql
This code path is no longer necessary because in the PacketDialog case a separate fixed epan_dissect_t is now passed in and save (9198448f9db7b77af8d19f8265d6785fb005dc58) Removing the tvb memory comparision is faster and reduces the number of ways that the PacketDialog can crash after the capture file is closed, for tvbs with data that was allocated at file scope, or freed when the file is closed like reassembly. Related to #14363
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp
index aefdd09737..8a266e7ce0 100644
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -180,7 +180,6 @@ ByteViewText * ByteViewTab::findByteViewTextForTvb(tvbuff_t * search_tvb, int *
bool found = false;
QList<ByteViewText *> allBVTs = findChildren<ByteViewText *>();
- unsigned int length = search_tvb->length;
for (int i = 0; i < allBVTs.size() && ! found; ++i)
{
ByteViewText * bvt = allBVTs.at(i);
@@ -188,19 +187,6 @@ ByteViewText * ByteViewTab::findByteViewTextForTvb(tvbuff_t * search_tvb, int *
if (stored == search_tvb)
{
found = true;
- }
- else if (stored)
- {
- if (stored->length >= length && tvb_memeql(search_tvb, 0, tvb_get_ptr(stored, 0, length), length) == 0)
- {
- /* In packetDialog we do not match, because we came from different data sources.
- * Assuming the capture files match, this should be a sufficient enough difference */
- found = true;
- }
- }
-
- if (found)
- {
int wdgIdx = bvt->property("tab_index").toInt();
if (idx)
{