Fix segmentation fault when using ibus-m17n with vi-telex in gedit in Gnome Wayland

Resolves: rhbz#1704156
This commit is contained in:
Mike FABIAN 2019-04-30 10:36:43 +02:00
parent 4e4eaf48ed
commit 5d433d6946
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,27 @@
From 4d815754f9f32c54ec47f9e323940f6332a7cb5d Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Tue, 30 Apr 2019 10:32:13 +0200
Subject: [PATCH] Fix segmentation fault when using ibus-m17n with vi-telex in
gedit in Gnome Wayland
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1704156
---
src/m17n-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/m17n-core.c b/src/m17n-core.c
index fe5aa77..642dfee 100644
--- a/src/m17n-core.c
+++ b/src/m17n-core.c
@@ -930,6 +930,8 @@ m17n_object_unref (void *object)
M17NObjectRecord *record;
unsigned *count;
+ if (object == NULL)
+ return -1;
if (! obj->ref_count_extended)
{
if (! --obj->ref_count)
--
2.20.1

View File

@ -3,13 +3,14 @@
Name: m17n-lib Name: m17n-lib
Version: 1.8.0 Version: 1.8.0
Release: 4%{?dist} Release: 5%{?dist}
Summary: Multilingual text library Summary: Multilingual text library
License: LGPLv2+ License: LGPLv2+
URL: http://www.nongnu.org/m17n/ URL: http://www.nongnu.org/m17n/
Source0: http://download.savannah.gnu.org/releases/m17n/%{name}-%{version}.tar.gz Source0: http://download.savannah.gnu.org/releases/m17n/%{name}-%{version}.tar.gz
Patch0: %{name}-1.8.0-multilib.patch Patch0: %{name}-1.8.0-multilib.patch
Patch1: Fix-segmentation-fault-when-using-ibus-m17n-with-vi-telex-in-gedit-in-wayland.patch
BuildRequires: m17n-db-devel libthai-devel BuildRequires: m17n-db-devel libthai-devel
BuildRequires: libxml2-devel libXft-devel BuildRequires: libxml2-devel libXft-devel
@ -61,7 +62,7 @@ Tools to test M17n GUI widget library.
%prep %prep
%autosetup %autosetup -p1
%build %build
#autoreconf -ivf #autoreconf -ivf
@ -114,6 +115,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{_libdir}/libm17n-gui.so.* %{_libdir}/libm17n-gui.so.*
%changelog %changelog
* Tue Apr 30 2019 Mike FABIAN <mfabian@redhat.com> - 1.8.0-5
- Fix segmentation fault when using ibus-m17n with vi-telex in gedit in Gnome Wayland
- Resolves: rhbz#1704156
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4 * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild