[libgsf/f18] Resolves: rhbz#922395 crash on writing thumbnails

Caolán McNamara caolanm at fedoraproject.org
Thu Apr 4 12:45:33 UTC 2013


commit d2e58e1a2d41b5f398231f34e0d5c8844dfb1a40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 4 13:45:25 2013 +0100

    Resolves: rhbz#922395 crash on writing thumbnails

 ...ome-695907-selinux-use-tmpdir-for-tmpfile.patch |    8 +-------
 libgsf.spec                                        |    5 ++++-
 2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/libgsf-gnome-695907-selinux-use-tmpdir-for-tmpfile.patch b/libgsf-gnome-695907-selinux-use-tmpdir-for-tmpfile.patch
index ad51c8c..73ee5ec 100644
--- a/libgsf-gnome-695907-selinux-use-tmpdir-for-tmpfile.patch
+++ b/libgsf-gnome-695907-selinux-use-tmpdir-for-tmpfile.patch
@@ -1,6 +1,6 @@
 --- libgsf-1.14.26/thumbnailer/main.c	2013-03-15 11:52:30.534080736 +0000
 +++ libgsf-1.14.26/thumbnailer/main.c	2013-03-15 12:03:26.380766098 +0000
-@@ -97,20 +97,19 @@
+@@ -97,14 +97,19 @@
  static void
  write_thumbnail (const char *filename, gconstpointer data, gsize size, int thumb_size)
  {
@@ -13,12 +13,6 @@
 -	fd = g_mkstemp (tmp_name);
 -	if (fd == -1) {
 -		perror ("Could not create temporary file");
--		exit (EXIT_FAILURE);
--	}
--
--	file = fdopen (fd, "w");
--	if (!file) {
--		show_error_string_and_exit ("Could not open temporary file for writing");
 +	fd = g_file_open_tmp("gsf-thumbnailer-XXXXXX", &tmp_name, &error);
 +	if(error) {
 +		if(error->message) {
diff --git a/libgsf.spec b/libgsf.spec
index 4deb755..af764c4 100644
--- a/libgsf.spec
+++ b/libgsf.spec
@@ -8,7 +8,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 Summary: GNOME Structured File library
 Name: libgsf
 Version: 1.14.24
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: System Environment/Libraries
 License: LGPLv2
 Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.14/%{name}-%{version}.tar.xz
@@ -99,6 +99,9 @@ fi
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Thu Apr 04 2013 Caolán McNamara <caolanm at redhat.com> 1.14.24-4
+- Resolves: rhbz#922395 crash on writing thumbnails
+
 * Fri Mar 15 2013 Caolán McNamara <caolanm at redhat.com> 1.14.24-3
 - Resolves: (well, push it along a bit) rhbz#921311 selinux foo
 


More information about the scm-commits mailing list