[gvfs/gnome-3-10] http: Fix segfault when seeking on read



commit 957f11be4d02c4cb2ee8b3a1181e7973d297eea7
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Sun Dec 8 12:44:06 2013 +0200

    http: Fix segfault when seeking on read
    
    Previously, the dav backend would segfault when reading after a seek (or
    also if you did a read_async() without an explicit send()/send_async()
    first) because the stream from soup_request_send_finish() was not being
    stored, so store it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710534

 daemon/gvfshttpinputstream.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfshttpinputstream.c b/daemon/gvfshttpinputstream.c
index d7eed19..4d18bcf 100644
--- a/daemon/gvfshttpinputstream.c
+++ b/daemon/gvfshttpinputstream.c
@@ -330,7 +330,8 @@ read_send_callback (GObject      *object,
   ReadAfterSendData *rasd = g_task_get_task_data (task);
   GError *error = NULL;
 
-  if (!soup_request_send_finish (SOUP_REQUEST (object), result, &error))
+  priv->stream = soup_request_send_finish (SOUP_REQUEST (object), result, &error);
+  if (!priv->stream)
     {
       g_task_return_error (task, error);
       g_object_unref (task);


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