Skip to content

Commit

Permalink
ui/gtk3/switcher: Avoid to unref m_engines with double run
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fujiwarat committed Nov 2, 2022
1 parent ddead51 commit cd621f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/gtk3/switcher.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cd621f8

Please sign in to comment.