diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2022-11-03 08:36:17 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2022-11-03 08:36:17 +0900 |
commit | cd621f8b82c80a174cd880cb27f27d7ccb9cb4d4 (patch) | |
tree | 475460e491395af0ec420b01363f145de5de713f | |
parent | ddead515d9d53fc692af252f610b009660494e21 (diff) | |
download | ibus-cd621f8b82c80a174cd880cb27f27d7ccb9cb4d4.tar.gz |
ui/gtk3/switcher: Avoid to unref m_engines with double run
m_engines could be a buffer overflow if switcher.run() is called
again and m_engines is unrefed durling showing the swicher popup.
BUG=rhbz#2081055
-rw-r--r-- | ui/gtk3/switcher.vala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala index a4529c88..9400e9ba 100644 --- a/ui/gtk3/switcher.vala +++ b/ui/gtk3/switcher.vala @@ -143,6 +143,8 @@ class Switcher : Gtk.Window { assert (m_loop == null); assert (index < engines.length); + if (m_is_running) + return index; m_is_running = true; m_keyval = keyval; m_modifiers = state; |