Qt: Avoid a potentially large memdup.
authorGerald Combs <gerald@wireshark.org>
Wed, 31 Jan 2018 17:31:47 +0000 (09:31 -0800)
committerMichael Mann <mmann78@netscape.net>
Thu, 1 Feb 2018 02:05:06 +0000 (02:05 +0000)
commit0c7bbc75364ce21e6e911c93da748abf854999b1
tree660e2929e9b2c9b1d99598cc1493df7efb1cef9a
parentb14e32cc77ded4a4db6f9cc6e207ce39f55637e9
Qt: Avoid a potentially large memdup.

Use QByteArray::fromRawData + tvb_get_ptr to create our ByteViewText
data instead of tvb_memdup. If our tvb lifetime is shorter than our
ByteViewText lifetime then that's a bug.

Change-Id: Iede275578a1493b8658308e0778f7f0799d6c6cd
Reviewed-on: https://code.wireshark.org/review/25534
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
ui/qt/byte_view_tab.cpp