aboutsummaryrefslogtreecommitdiffstats
path: root/epan/osi-utils.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-03-28 18:14:35 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-03-30 22:28:01 +0000
commit0ea51ad82256f833a0d93efb16aa4e749c80eb5b (patch)
tree164819384084d6998f090f4a9c81492e34c122ac /epan/osi-utils.h
parentaa6dcf9cd317d223f6d3f1e12917b807d2abb5d7 (diff)
Qt: Fix uninitialized memory access in val_units_
Fixes the following UBSAN errors: ui/qt/io_graph_dialog.cpp:1720:75: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b0cd1d in IOGraph::setFilter(QString const&) ui/qt/io_graph_dialog.cpp:1720:75 #1 0x5611f0b737a1 in IOGraph::IOGraph(QCustomPlot*) ui/qt/io_graph_dialog.cpp:1682:5 #2 0x5611f0afb3f3 in IOGraphDialog::addGraph(bool, QString, QString, int, IOGraph::PlotStyles, io_graph_item_unit_t, QString, int) ui/qt/io_graph_dialog.cpp:340:24 #3 0x5611f0af7c19 in IOGraphDialog::IOGraphDialog(QWidget&, CaptureFile&) ui/qt/io_graph_dialog.cpp:289:13 ui/qt/io_graph_dialog.cpp:1818:19: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b1167e in IOGraph::setPlotStyle(int) ui/qt/io_graph_dialog.cpp:1818:19 #1 0x5611f0b062ee in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:420:10 ui/qt/io_graph_dialog.cpp:1872:29: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b13e6a in IOGraph::setValueUnits(int) ui/qt/io_graph_dialog.cpp:1872:29 #1 0x5611f0b06640 in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:422:10 Note that calling setFilter with an empty string is pretty useless, especially since the filter is initialized later, so remove it. The choice for IOG_ITEM_UNIT_FIRST is quite arbitrary and needed because setValueUnits reads the "old" (uninitialized) value. Change-Id: I32c65a30593cb718b838c0f324e0d1b0eaab90e5 Reviewed-on: https://code.wireshark.org/review/20767 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/osi-utils.h')
0 files changed, 0 insertions, 0 deletions