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: Fix memory leak in compose
Date: Sun, 31 May 2026 02:09:02 GMT [thread overview]
Message-ID: <178019334218.1.14483293213120383768.rpms-ibus-c740599bb0d6@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/ibus
Branch : autotool
Commit : c740599bb0d63bce19995be29e445b8520942b99
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date : 2025-09-25T20:39:42+09:00
Stats : +86/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ibus/c/c740599bb0d63bce19995be29e445b8520942b99?branch=autotool
Log:
Fix memory leak in compose
---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index e69de29..7f9a6bd 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -0,0 +1,81 @@
+From abe7ed1bbe59fc89cf9a4cac5f0f4c3c6dee8cf7 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 25 Sep 2025 19:33:35 +0900
+Subject: [PATCH] src/ibuscomposetable: Fix leak with %L in compose file
+
+When IBus compose cache file is generated and the compose file
+includes "%L", a leak happens.
+Also fixes leaks in unicode-parser.
+---
+ src/ibuscomposetable.c | 3 ++-
+ src/unicode-parser.c | 12 +++++++++++-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
+index 8a4b17a0..e60ad091 100644
+--- a/src/ibuscomposetable.c
++++ b/src/ibuscomposetable.c
+@@ -284,6 +284,7 @@ expand_include_path (const char *include_path) {
+ break;
+ }
+ case 'L': /* locale compose file */
++ g_free (out);
+ out = g_strdup ("%L");
+ head = i + 2;
+ while (*head || *head == ' ' || *head == '\t') head++;
+@@ -315,7 +316,7 @@ expand_include_path (const char *include_path) {
+ "has been ignored", include_path, *(i+1));
+ goto fail;
+ }
+- ++i;
++ break;
+ }
+ }
+ o = out;
+diff --git a/src/unicode-parser.c b/src/unicode-parser.c
+index 8fece362..f86c1c81 100644
+--- a/src/unicode-parser.c
++++ b/src/unicode-parser.c
+@@ -141,7 +141,13 @@ ucd_names_list_parse_alias (const gchar *line,
+
+ if (*line == '\0')
+ return FALSE;
+- data->alias = g_strdup (line);
++ if (data->alias) {
++ gchar *new_alias = g_strdup_printf ("%s;%s", data->alias, line);
++ g_free (data->alias);
++ data->alias = new_alias;
++ } else {
++ data->alias = g_strdup (line);
++ }
+ return TRUE;
+ }
+
+@@ -197,6 +203,7 @@ ucd_names_list_parse_line (const gchar *line,
+ }
+ data->code = code;
+ data->name = name;
++ g_strfreev (elements);
+ }
+ return TRUE;
+ }
+@@ -521,6 +528,7 @@ main (int argc, char *argv[])
+ if (output_names_list && names_list)
+ ibus_unicode_data_save (output_names_list, names_list);
+ g_free (output_names_list);
++ g_slist_free_full (names_list, g_object_unref);
+
+ if (input_blocks) {
+ ucd_parse_file (input_blocks, &blocks_list, UCD_BLOCKS);
+@@ -531,6 +539,8 @@ main (int argc, char *argv[])
+ if (output_blocks_trans && blocks_list)
+ ucd_block_translatable_save (output_blocks_trans, blocks_list);
+ g_free (output_blocks);
++ g_free (output_blocks_trans);
++ g_slist_free_full (blocks_list, g_object_unref);
+
+ g_free (unicode_version);
+ return 0;
+--
+2.50.1
+
diff --git a/ibus.spec b/ibus.spec
index fc74ed0..a07e44c 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -63,7 +63,7 @@
Name: ibus
Version: 1.5.33~rc1
# https://github.com/fedora-infra/rpmautospec/issues/101
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPL-2.1-or-later
URL: https://github.com/ibus/%name/wiki
@@ -72,6 +72,7 @@ Source1: https://github.com/ibus/%name/releases/download/%{source_version
Source2: %{name}-xinput
Source3: %{name}.conf.5
# Patch0: %%{name}-HEAD.patch
+Patch0: %{name}-HEAD.patch
# Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
Patch1: %{name}-1385349-segv-bus-proxy.patch
@@ -638,6 +639,9 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
+* Thu Sep 25 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.33~rc1-3
+- Fix memory leak in compose
+
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1.5.33~rc1-2
- Rebuilt for Python 3.14.0rc3 bytecode
reply other threads:[~2026-05-31 2:09 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=178019334218.1.14483293213120383768.rpms-ibus-c740599bb0d6@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