Resolves: rhbz#922395 crash on fwrite

This commit is contained in:
Caolán McNamara 2013-04-04 13:09:35 +01:00
parent 796096d70b
commit 22a4619ccd
2 changed files with 5 additions and 8 deletions

View File

@ -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) {

View File

@ -1,7 +1,7 @@
Summary: GNOME Structured File library
Name: libgsf
Version: 1.14.26
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
@ -77,6 +77,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Apr 04 2013 Caolán McNamara <caolanm@redhat.com> 1.14.26-4
- Resolves: rhbz#922395 crash on fwrite
* Thu Apr 04 2013 Caolán McNamara <caolanm@redhat.com> 1.14.26-3
- Resolves: rhbz#925752 support aarch64