From 1a55d8b633b88b77fab795e9b850b6f05b2eac0d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Apr 14 2024 16:36:54 +0000 Subject: Backport MR #1488 to fix crash when compressing files and folders --- diff --git a/1488.patch b/1488.patch new file mode 100644 index 0000000..612a297 --- /dev/null +++ b/1488.patch @@ -0,0 +1,35 @@ +From 8d772b0981fda386c195e05489e11e48fdab7957 Mon Sep 17 00:00:00 2001 +From: Khalid Abu Shawarib +Date: Sat, 13 Apr 2024 11:54:03 +0300 +Subject: [PATCH] file-utilities: Fix double free + +Fixes: #3389 +--- + src/nautilus-file-utilities.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c +index 8ad906051b..edc7bb5ed0 100644 +--- a/src/nautilus-file-utilities.c ++++ b/src/nautilus-file-utilities.c +@@ -830,7 +830,7 @@ nautilus_get_common_filename_prefix (GList *file_list, + { + g_autoptr (GPtrArray) file_names = NULL; + g_autoptr (GPtrArray) directory_names = NULL; +- g_autofree char *result_files = NULL; ++ char *result_files = NULL; + g_autofree char *result = NULL; + g_autofree char *result_trimmed = NULL; + +@@ -868,7 +868,7 @@ nautilus_get_common_filename_prefix (GList *file_list, + + if (directory_names->len == 0) + { +- return g_steal_pointer (&result_files); ++ return result_files; + } + + if (result_files != NULL) +-- +GitLab + diff --git a/nautilus.spec b/nautilus.spec index 5622dd8..644d5a5 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -9,13 +9,18 @@ Name: nautilus Version: 46.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: File manager for GNOME # Sources are GPL-3.0-or-later and Appdata is CC0-1.0. License: GPL-3.0-or-later AND CC0-1.0 URL: https://apps.gnome.org/Nautilus/ Source0: https://download.gnome.org/sources/%{name}/46/%{name}-%{tarball_version}.tar.xz +# https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1488 +# https://gitlab.gnome.org/GNOME/nautilus/-/issues/3389 +# https://bugzilla.redhat.com/show_bug.cgi?id=2274724 +# Fix double free causing crash when compressing files +Patch: 1488.patch BuildRequires: desktop-file-utils BuildRequires: gcc @@ -145,6 +150,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop %doc %{_datadir}/doc/nautilus/ %changelog +* Sun Apr 14 2024 Adam Williamson - 46.0-2 +- Backport MR #1488 to fix crash when compressing files and folders + * Tue Mar 19 2024 David King - 46.0-1 - Update to 46.0