[gvfs] Fix stringv transfer over dbus



commit a9c0df8ba0c6f3003517c49099b241229f5b755e
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Mon Sep 27 17:17:20 2010 +0200

    Fix stringv transfer over dbus
    
    The wrong iterator passed in caused some items to be silently dropped
    plus it led to string dup of wrong pointer.
    
    See bug 614544 for reference.

 common/gvfsdaemonprotocol.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c
index 4185c52..e38b963 100644
--- a/common/gvfsdaemonprotocol.c
+++ b/common/gvfsdaemonprotocol.c
@@ -128,6 +128,7 @@ _g_dbus_attribute_as_pointer (GFileAttributeType type,
   case G_FILE_ATTRIBUTE_TYPE_STRING:
   case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
   case G_FILE_ATTRIBUTE_TYPE_OBJECT:
+  case G_FILE_ATTRIBUTE_TYPE_STRINGV:
     return value->ptr;
   default:
     return (gpointer) value;
@@ -372,7 +373,7 @@ _g_dbus_get_file_attribute (DBusMessageIter *iter,
 	{
 	  char **strv;
 	  int n_elements;
-	  if (!_g_dbus_message_iter_get_args (iter, NULL,
+	  if (!_g_dbus_message_iter_get_args (&variant_iter, NULL,
 					      DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &strv, &n_elements,
 					      0))
 	    goto error;



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