[gvfs] archive: fix segfault when libarchive fails



commit 41266f89894dabcc502d1bf1be65592d23eb24cc
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 ad992f3..b9284ba 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]