diff --git a/fcitx.spec b/fcitx.spec index adb036e2bd38721ee72bc76a0796f98645cc0205..580e2b2a4a7e8919aaeef4a9880c56776a5ad4f2 100755 --- a/fcitx.spec +++ b/fcitx.spec @@ -5,7 +5,7 @@ Name: fcitx Summary: An input method framework Version: 4.2.9.7 -Release: 4 +Release: 5 License: GPL-2.0-or-later URL: https://fcitx-im.org/wiki/Fcitx Source0: https://download.fcitx-im.org/fcitx/%{name}-%{version}_dict.tar.xz @@ -20,6 +20,7 @@ Requires(postun): %{_sbindir}/alternatives Patch1: 0001-fix-fcitx-desktop-hide-fcitx-from-kiran-menu-of-Kira.patch Patch2: 0001-fix-nodisplay.patch +Patch3: fix-null-file-pointer-issue.patch %description Fcitx is an input method framework with extension support. Currently it @@ -188,6 +189,9 @@ fi %{_datadir}/gir-1.0/Fcitx-1.0.gir %changelog +* Tue Sep 02 2025 kkz - 4.2.9.7-5 +- fix null file pointer issue which leads to coredump + * Wed Nov 20 2024 Funda Wang - 4.2.9.7-4 - adopt to new cmake macro diff --git a/fix-null-file-pointer-issue.patch b/fix-null-file-pointer-issue.patch new file mode 100644 index 0000000000000000000000000000000000000000..5da27be880965f52548200b0bcddbd00fa8eb3ee --- /dev/null +++ b/fix-null-file-pointer-issue.patch @@ -0,0 +1,26 @@ +From 5346cbb52df2ef5ee46ad032660f15e164a7b669 Mon Sep 17 00:00:00 2001 +From: zhaoshuang +Date: Tue, 2 Sep 2025 14:40:07 +0800 +Subject: [PATCH] fix null file pointer issue + +--- + src/im/pinyin/sp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/im/pinyin/sp.c b/src/im/pinyin/sp.c +index 19af826..cddbc4e 100644 +--- a/src/im/pinyin/sp.c ++++ b/src/im/pinyin/sp.c +@@ -166,7 +166,8 @@ void LoadSPData(FcitxPinyinState *pystate) + } + } + +- fclose(fp); ++ if (fp) ++ fclose(fp); + } + break; + } +-- +2.43.0 +