diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-11-30 01:10:07 +0000 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-11-30 02:53:34 +0000 |
commit | bb4726abf220e5223a8eee8120bae14ef2f1a4a4 (patch) | |
tree | 370c0a1596ea48147aafd474d91db2dbaadd7e92 | |
parent | 3d6da018e7969c23b172b37a9f556696783ca9b1 (diff) |
Qt: fix crash when selecting field with composite data
The HTTP2 decompressed headers tab is composed from multiple TVBs, these
have a null "real_data" pointer. Do not access it directly but use an
accessor which Does The Right Thing™.
Change-Id: Ib974fed9782d60aa2b91e3e712ba737000b79b4b
Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView")
Reviewed-on: https://code.wireshark.org/review/24658
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexander Gryanko <xpahos@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | ui/qt/byte_view_tab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp index 04f15a75d6..a038f637df 100644 --- a/ui/qt/byte_view_tab.cpp +++ b/ui/qt/byte_view_tab.cpp @@ -182,7 +182,7 @@ ByteViewText * ByteViewTab::findByteViewTextForTvb(tvbuff_t * search_tvb, int * } else if ( stored ) { - if ( stored->length >= length && tvb_memeql(search_tvb, 0, stored->real_data, length ) == 0 ) + 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 */ |