]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/dbus-util.c
Enough is enough! I have had it with these motherf**ng gcc on this motherf**ng shut...
[catta] / avahi-daemon / dbus-util.c
index 76a6b73c5984f1d97f0973c40a9a3007b54a8b54..ca08d7b1dffb1461c57aed62fc187b51e39704ac 100644 (file)
@@ -327,9 +327,9 @@ int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l) {
     dbus_message_iter_recurse(&iter, &sub);
         
     for (;;) {
-        DBusMessageIter sub2;
         int at, n;
-        uint8_t *k;
+        const uint8_t *k;
+        DBusMessageIter sub2;
         
         if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
             break;
@@ -340,7 +340,14 @@ int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l) {
             goto fail;
 
         dbus_message_iter_recurse(&sub, &sub2);
+            
+        k = (const uint8_t*) "";
+        n = 0;
         dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+
+        if (!k)
+            k = (const uint8_t*) "";
+            
         strlst = avahi_string_list_add_arbitrary(strlst, k, n);
         
         dbus_message_iter_next(&sub);