From 758ee3dc899ecd7b0de9179fc4d4d7a88e05d27e Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 7 Mar 2015 13:30:46 +0100 Subject: [PATCH] Qt: fix use of uninitialized variable Fixes error reported by UBSan: ui/qt/packet_list.cpp:537:13: runtime error: load of value 190, which is not a valid value for type 'bool' The method is apparently called earlier for other timers, resulting in an error on startup. Initialize rows_inserted_ to avoid warnings when the event is triggered later. Change-Id: Iad919d79264ff1c3c17c9458c869d584234fcd5d Reviewed-on: https://code.wireshark.org/review/7575 Reviewed-by: Peter Wu --- ui/qt/packet_list.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 89749442ca..555a15881e 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -229,7 +229,8 @@ PacketList::PacketList(QWidget *parent) : decode_as_(NULL), ctx_column_(-1), capture_in_progress_(false), - tail_timer_id_(0) + tail_timer_id_(0), + rows_inserted_(false) { QMenu *submenu, *subsubmenu; QAction *action;