[gvfs/gnome-3-10] archive: fix segfault when libarchive fails



commit f2210ce76746521f797347a03e0246dee95b43d7
Author: Ondrej Holy <oholy redhat com>
Date:   Fri Nov 1 13:09:50 2013 +0100

    archive: fix segfault when libarchive fails
    
    When libarchive fails g_vfs_job_failed is called even as
    g_vfs_job_succeeded which cause segfault. Set GError instead of
    g_vfs_job_failed to fix that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670534

 daemon/gvfsbackendarchive.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gvfsbackendarchive.c b/daemon/gvfsbackendarchive.c
index 0dfe0fb..3784dc7 100644
--- a/daemon/gvfsbackendarchive.c
+++ b/daemon/gvfsbackendarchive.c
@@ -171,10 +171,10 @@ gvfs_archive_set_error_from_errno (GVfsArchive *archive)
   if (gvfs_archive_in_error (archive))
     return;
 
-  g_vfs_job_failed_literal (archive->job,
-                            G_IO_ERROR,
-                            g_io_error_from_errno (archive_errno (archive->archive)),
-                            archive_error_string (archive->archive));
+  g_set_error_literal (&archive->error,
+                      G_IO_ERROR,
+                      g_io_error_from_errno (archive_errno (archive->archive)),
+                      archive_error_string (archive->archive));
 }
 
 static void 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]