summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-connection.h8
-rw-r--r--dbus/dbus-list.c13
-rw-r--r--dbus/dbus-list.h2
-rw-r--r--dbus/dbus-sysdeps.c4
4 files changed, 20 insertions, 7 deletions
diff --git a/dbus/dbus-connection.h b/dbus/dbus-connection.h
index 6e8a9f15..c2206cd3 100644
--- a/dbus/dbus-connection.h
+++ b/dbus/dbus-connection.h
@@ -183,11 +183,11 @@ void* dbus_connection_get_data (DBusConnection *connection,
void dbus_connection_set_change_sigpipe (dbus_bool_t will_modify_sigpipe);
-void dbus_connection_set_max_message_size (DBusConnection *connection,
- long size);
-long dbus_connection_get_max_message_size (DBusConnection *connection);
+void dbus_connection_set_max_message_size (DBusConnection *connection,
+ long size);
+long dbus_connection_get_max_message_size (DBusConnection *connection);
void dbus_connection_set_max_received_size (DBusConnection *connection,
- long size);
+ long size);
long dbus_connection_get_max_received_size (DBusConnection *connection);
long dbus_connection_get_outgoing_size (DBusConnection *connection);
diff --git a/dbus/dbus-list.c b/dbus/dbus-list.c
index 5f4c67ca..235ed275 100644
--- a/dbus/dbus-list.c
+++ b/dbus/dbus-list.c
@@ -470,7 +470,15 @@ _dbus_list_remove_last (DBusList **list,
return FALSE;
}
-static void
+/**
+ * Removes the given link from the list, but doesn't
+ * free it. _dbus_list_remove_link() both removes the
+ * link and also frees it.
+ *
+ * @param list the list
+ * @param link the link in the list
+ */
+void
_dbus_list_unlink (DBusList **list,
DBusList *link)
{
@@ -487,6 +495,9 @@ _dbus_list_unlink (DBusList **list,
if (*list == link)
*list = link->next;
}
+
+ link->next = NULL;
+ link->prev = NULL;
}
/**
diff --git a/dbus/dbus-list.h b/dbus/dbus-list.h
index ad74dfd0..f3b37ef8 100644
--- a/dbus/dbus-list.h
+++ b/dbus/dbus-list.h
@@ -74,6 +74,8 @@ dbus_bool_t _dbus_list_copy (DBusList **list,
int _dbus_list_get_length (DBusList **list);
DBusList* _dbus_list_alloc_link (void *data);
void _dbus_list_free_link (DBusList *link);
+void _dbus_list_unlink (DBusList **list,
+ DBusList *link);
void _dbus_list_append_link (DBusList **list,
DBusList *link);
void _dbus_list_prepend_link (DBusList **list,
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index 62aa0b4b..7673085f 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -470,8 +470,8 @@ _dbus_listen_unix_socket (const char *path,
* But there doesn't seem to be a good way to do this.
*
* Just to be extra careful, I threw in the stat() - clearly
- * the stat() can't *fix* any security issue, but it probably
- * makes it harder to exploit.
+ * the stat() can't *fix* any security issue, but it at least
+ * avoids inadvertent/accidental data loss.
*/
{
struct stat sb;