connection: only write the header of KDBUS_ITEM_FDS
authorDaniel Mack <zonque@gmail.com>
Tue, 17 Dec 2013 14:42:39 +0000 (15:42 +0100)
committerDaniel Mack <zonque@gmail.com>
Tue, 17 Dec 2013 14:42:39 +0000 (15:42 +0100)
connection.c

index 963bdfa7a3536c7510d9b631f1beed1707239087..6ad519826b4282e5959f6b5346f4b3fd8e48f6ca 100644 (file)
@@ -435,7 +435,8 @@ static int kdbus_conn_queue_insert(struct kdbus_conn *conn,
                it->type = KDBUS_ITEM_FDS;
                it->size = KDBUS_ITEM_HEADER_SIZE +
                           (kmsg->fds_count * sizeof(int));
-               ret = kdbus_pool_write(conn->pool, off + fds, it, it->size);
+               ret = kdbus_pool_write(conn->pool, off + fds,
+                                      it, KDBUS_ITEM_HEADER_SIZE);
                if (ret < 0)
                        goto exit_pool_free;