Update to 40.1
This commit is contained in:
parent
65e95afe2b
commit
f67391be77
1
.gitignore
vendored
1
.gitignore
vendored
@ -175,3 +175,4 @@ gnome-desktop-2.90.4.tar.bz2
|
|||||||
/gnome-desktop-40.beta.tar.xz
|
/gnome-desktop-40.beta.tar.xz
|
||||||
/gnome-desktop-40.rc.tar.xz
|
/gnome-desktop-40.rc.tar.xz
|
||||||
/gnome-desktop-40.0.tar.xz
|
/gnome-desktop-40.0.tar.xz
|
||||||
|
/gnome-desktop-40.1.tar.xz
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
From aa7e344051170ea47585d3d72b1a36e3991121f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
||||||
Date: Thu, 22 Apr 2021 11:29:18 +1000
|
|
||||||
Subject: [PATCH] xkbinfo: only insert new layouts, skip over duplicate ones
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This matches the behavior to the one in the old code path before
|
|
||||||
libxkbregistry.
|
|
||||||
|
|
||||||
This also fixes a use-after-free bug when a duplicate layout is present. The
|
|
||||||
same layout struct is a member of multiple hashtables, specifically
|
|
||||||
priv->layouts_table, priv->layouts_by_language and priv->layouts_by_country.
|
|
||||||
|
|
||||||
When the duplicate layout is added, add_layouts calls g_hash_table_replace
|
|
||||||
(priv->layouts_table, l->id, l) which frees the original layout - but the
|
|
||||||
layouts_by_{country|language} still have that now-freed layout.
|
|
||||||
Immediately afterwards, add_layouts calls add_layout_to_locale_tables () which
|
|
||||||
calls add_layout_to_table () which triggers a use-after-free.
|
|
||||||
|
|
||||||
Avoid all this by simply skipping any duplicate layout.
|
|
||||||
|
|
||||||
Reproducible with
|
|
||||||
gsettings set org.gnome.desktop.input-sources show-all-sources true
|
|
||||||
valgrind /usr/libexec/gnome-desktop-debug/test-xkb-info
|
|
||||||
|
|
||||||
Requires xkeyboard-config <= 2.32, it has a duplicate cm(mmuock) entry
|
|
||||||
(one is marked exotic, hence the need for show-all-sources).
|
|
||||||
|
|
||||||
Fixes #190
|
|
||||||
|
|
||||||
Bug analysis by Barnabás Pőcze (@pobrn)
|
|
||||||
|
|
||||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
||||||
---
|
|
||||||
libgnome-desktop/gnome-xkb-info.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
|
|
||||||
index b2eca699..f2a3214b 100644
|
|
||||||
--- a/libgnome-desktop/gnome-xkb-info.c
|
|
||||||
+++ b/libgnome-desktop/gnome-xkb-info.c
|
|
||||||
@@ -268,6 +268,12 @@ add_layouts (GnomeXkbInfo *self,
|
|
||||||
l->iso3166Ids = g_slist_prepend (l->iso3166Ids, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (g_hash_table_contains (priv->layouts_table, l->id))
|
|
||||||
+ {
|
|
||||||
+ g_clear_pointer (&l, free_layout);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
g_hash_table_replace (priv->layouts_table, l->id, l);
|
|
||||||
add_layout_to_locale_tables (l,
|
|
||||||
priv->layouts_by_language,
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
|||||||
%global tarball_version %%(echo %{version} | tr '~' '.')
|
%global tarball_version %%(echo %{version} | tr '~' '.')
|
||||||
|
|
||||||
Name: gnome-desktop3
|
Name: gnome-desktop3
|
||||||
Version: 40.0
|
Version: 40.1
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Library with common API for various GNOME modules
|
Summary: Library with common API for various GNOME modules
|
||||||
|
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
@ -48,9 +48,6 @@ BuildRequires: pkgconfig(xkeyboard-config)
|
|||||||
Conflicts: shared-mime-info < 2.0-4
|
Conflicts: shared-mime-info < 2.0-4
|
||||||
Requires: shared-mime-info
|
Requires: shared-mime-info
|
||||||
|
|
||||||
# https://gitlab.gnome.org/GNOME/gnome-desktop/-/issues/190
|
|
||||||
Patch0: 0001-xkbinfo-only-insert-new-layouts-skip-over-duplicate-.patch
|
|
||||||
|
|
||||||
%if !0%{?flatpak}
|
%if !0%{?flatpak}
|
||||||
Requires: bubblewrap
|
Requires: bubblewrap
|
||||||
%endif
|
%endif
|
||||||
@ -132,6 +129,9 @@ cat %SOURCE5 >> $RPM_BUILD_ROOT/%{_datadir}/applications/gnome-mimeapps.list
|
|||||||
%{_datadir}/installed-tests
|
%{_datadir}/installed-tests
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 05 2021 Kalev Lember <klember@redhat.com> - 40.1-1
|
||||||
|
- Update to 40.1
|
||||||
|
|
||||||
* Thu Apr 22 2021 Bastien Nocera <bnocera@redhat.com> - 40.0-3
|
* Thu Apr 22 2021 Bastien Nocera <bnocera@redhat.com> - 40.0-3
|
||||||
+ gnome-desktop3-40.0-3
|
+ gnome-desktop3-40.0-3
|
||||||
- Fix crash opening keyboard layouts dialogue
|
- Fix crash opening keyboard layouts dialogue
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (gnome-desktop-40.0.tar.xz) = faf6fd2a0c5db47a49319c03ca9a348d77092050cdd8d79a74979b2878d0e35ffa85bbe5e87449f9285ceb28a884439de6eb73d6b9fcaa02236eb48f4a7ac49c
|
SHA512 (gnome-desktop-40.1.tar.xz) = ff9da5d0c805a7d42339a9174b907dd0cc4845c8eeb5a004a13f001dbe449f28a6360ed9dc1951376be4a48271908990052ca0e8d6e4339214cafcb80d204b57
|
||||||
|
Loading…
Reference in New Issue
Block a user