From 14cc6c7d86d9d5a5315a155a0ac94c8ea8c23cb3 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 12 Sep 2017 17:22:00 -0700 Subject: [PATCH] Also backport BGO #787570 fix from upstream --- mutter-3.26.0-use-gnew0-not-gnew.patch | 28 ++++++++++++++++++++++++++ mutter.spec | 8 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 mutter-3.26.0-use-gnew0-not-gnew.patch diff --git a/mutter-3.26.0-use-gnew0-not-gnew.patch b/mutter-3.26.0-use-gnew0-not-gnew.patch new file mode 100644 index 0000000..36f009f --- /dev/null +++ b/mutter-3.26.0-use-gnew0-not-gnew.patch @@ -0,0 +1,28 @@ +From 21609ac6655ea7bee5cba9b37ec470375bcaf5d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Tue, 12 Sep 2017 12:20:31 +0800 +Subject: [PATCH] wayland/inhibit-shortcuts-dialog: Use g_new0 instead of g_new + +The code assumed the newly allocated blocked was initialized to 0, but +it wasn't since g_new was used. Fix that by using g_new0. + +https://bugzilla.gnome.org/show_bug.cgi?id=787570 +--- + src/wayland/meta-wayland-inhibit-shortcuts-dialog.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c b/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c +index da897b9b3..5f883f765 100644 +--- a/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c ++++ b/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c +@@ -112,7 +112,7 @@ meta_wayland_surface_ensure_inhibit_shortcuts_dialog (MetaWaylandSurface *surfac + if (data) + return data; + +- data = g_new (InhibitShortcutsData, 1); ++ data = g_new0 (InhibitShortcutsData, 1); + surface_inhibit_shortcuts_data_set (surface, data); + g_signal_connect (surface, "destroy", + G_CALLBACK (on_surface_destroyed), +-- +2.13.5 \ No newline at end of file diff --git a/mutter.spec b/mutter.spec index 0f3f561..0f2d58a 100644 --- a/mutter.spec +++ b/mutter.spec @@ -7,7 +7,7 @@ Name: mutter Version: 3.26.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -22,6 +22,9 @@ Patch0: startup-notification.patch Patch1: mutter-3.26.0-keep-inhibit-shortcut-dialog.patch Patch2: mutter-3.26.0-do-not-leak-shortcut-inhibit-data.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=787570 +Patch3: mutter-3.26.0-use-gnew0-not-gnew.patch + BuildRequires: chrpath BuildRequires: pango-devel BuildRequires: startup-notification-devel @@ -191,6 +194,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/mutter/tests %changelog +* Tue Sep 12 2017 Adam Williamson - 3.26.0-4 +- Also backport BGO #787570 fix from upstream + * Tue Sep 12 2017 Adam Williamson - 3.26.0-3 - Backport upstream fixes for crasher bug BGO #787568