public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Takao Fujiwara <tfujiwar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ibus] autotool: Resolves: #2081055 Avoid to unref m_engines with double run
Date: Sun, 31 May 2026 02:07:59 GMT	[thread overview]
Message-ID: <178019327994.1.14607680322449514734.rpms-ibus-b772623e2ea8@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : b772623e2ea84bc04802d5477f99ae6df7369c15
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date   : 2022-11-03T09:31:07+09:00
Stats  : +45/-11 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/b772623e2ea84bc04802d5477f99ae6df7369c15?branch=autotool

Log:
Resolves: #2081055 Avoid to unref m_engines with double run

---
diff --git a/ibus-1385349-segv-bus-proxy.patch b/ibus-1385349-segv-bus-proxy.patch
index 1f16094..0f8006d 100644
--- a/ibus-1385349-segv-bus-proxy.patch
+++ b/ibus-1385349-segv-bus-proxy.patch
@@ -1,6 +1,6 @@
-From c093fec83da277c79f31e09b1b910d35bd4135c8 Mon Sep 17 00:00:00 2001
+From f6d31621404dc8716bddd0588402fbdde4f5fb73 Mon Sep 17 00:00:00 2001
 From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Sat, 25 Jun 2022 19:46:01 +0900
+Date: Thu, 3 Nov 2022 08:59:41 +0900
 Subject: [PATCH] Fix SEGV in bus_panel_proxy_focus_in()
 
 rhbz#1350291 SEGV in BUS_IS_CONNECTION(skip_connection) in
@@ -238,7 +238,7 @@ index fd1f34fb..57c061ba 100644
      /* FIXME: set destroy callback ? */
      g_task_return_pointer (data->task, engine, NULL);
 diff --git a/client/x11/main.c b/client/x11/main.c
-index fe30c1d6..49595b6d 100644
+index 6057cc03..12e9012c 100644
 --- a/client/x11/main.c
 +++ b/client/x11/main.c
 @@ -45,6 +45,7 @@
@@ -249,7 +249,7 @@ index fe30c1d6..49595b6d 100644
  
  #include <getopt.h>
  
-@@ -1121,7 +1122,12 @@ _atexit_cb ()
+@@ -1148,7 +1149,12 @@ _atexit_cb ()
  static void
  _sighandler (int sig)
  {
@@ -296,7 +296,7 @@ index a6f2e8e6..b7a04081 100644
          m_panel.load_settings();
      }
 diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala
-index a4529c88..29a70dd5 100644
+index 9400e9ba..2ecbdac1 100644
 --- a/ui/gtk3/switcher.vala
 +++ b/ui/gtk3/switcher.vala
 @@ -140,8 +140,8 @@ class Switcher : Gtk.Window {
@@ -308,9 +308,9 @@ index a4529c88..29a70dd5 100644
 +        assert(m_loop == null);
 +        assert(index < engines.length);
  
-         m_is_running = true;
-         m_keyval = keyval;
-@@ -198,16 +198,18 @@ class Switcher : Gtk.Window {
+         if (m_is_running)
+             return index;
+@@ -200,16 +200,18 @@ class Switcher : Gtk.Window {
                             null,
                             event,
                             null);
@@ -338,7 +338,7 @@ index a4529c88..29a70dd5 100644
  #else
          Gdk.Device device = event.get_device();
          if (device == null) {
-@@ -243,30 +245,41 @@ class Switcher : Gtk.Window {
+@@ -245,30 +247,41 @@ class Switcher : Gtk.Window {
                                 Gdk.EventMask.KEY_RELEASE_MASK,
                                 null,
                                 Gdk.CURRENT_TIME);
@@ -400,5 +400,5 @@ index a4529c88..29a70dd5 100644
  #if VALA_0_34
          seat.ungrab();
 -- 
-2.35.3
+2.37.3
 

diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index f886852..9f57a0d 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -289,3 +289,32 @@ index 7981de38..28ae04ad 100644
 -- 
 2.37.3
 
+From cd621f8b82c80a174cd880cb27f27d7ccb9cb4d4 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 3 Nov 2022 08:36:17 +0900
+Subject: [PATCH] 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
+---
+ ui/gtk3/switcher.vala | 2 ++
+ 1 file changed, 2 insertions(+)
+
+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;
+-- 
+2.37.3
+

diff --git a/ibus.spec b/ibus.spec
index 64e04bb..442f89b 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -39,7 +39,7 @@
 
 Name:           ibus
 Version:        1.5.27
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Intelligent Input Bus for Linux OS
 License:        LGPLv2+
 URL:            https://github.com/ibus/%name/wiki
@@ -301,6 +301,7 @@ fi
 #autoreconf -f -i -v
 #make -C ui/gtk3 maintainer-clean-generic
 #make -C tools maintainer-clean-generic
+autoreconf -f -i -v
 %configure \
     --disable-static \
     --enable-gtk2 \
@@ -322,6 +323,7 @@ fi
     --enable-install-tests \
     %{nil}
 
+make -C ui/gtk3 maintainer-clean-generic
 %make_build
 
 %install
@@ -521,6 +523,9 @@ dconf update || :
 %{_datadir}/installed-tests/ibus
 
 %changelog
+* Thu Nov 03 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.27-4
+- Resolves: #2081055 Avoid to unref m_engines with double run
+
 * Mon Sep 19 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.27-3
 - Update ibus_input_context_set_surrounding_text for a global IC
 - Fix CI

                 reply	other threads:[~2026-05-31  2:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178019327994.1.14607680322449514734.rpms-ibus-b772623e2ea8@fedoraproject.org \
    --to=tfujiwar@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox