summaryrefslogtreecommitdiff
path: root/gdk/broadway
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-03-18 16:37:25 +0100
committerAlexander Larsson <alexl@redhat.com>2013-03-18 16:41:05 +0100
commit8fb60cda198b6e08d3f1107bf55f573d6f89fcc5 (patch)
treebfdbd49f05efa61dc050ddbb31bc1eadc24879a4 /gdk/broadway
parent99cc5758b117607324f59f8c7fcc1d6bc4ff4451 (diff)
downloadgtk+-8fb60cda198b6e08d3f1107bf55f573d6f89fcc5.tar.gz
broadway: Fix assert failure
Requests are not limited in size by BroadwayRequest, as BroadwayRequestTranslation can be of variable size. No need to copy the request anymore though, because requests are aligned now.
Diffstat (limited to 'gdk/broadway')
-rw-r--r--gdk/broadway/broadwayd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c
index 9a273c7f56..1c06eb7613 100644
--- a/gdk/broadway/broadwayd.c
+++ b/gdk/broadway/broadwayd.c
@@ -409,7 +409,6 @@ client_fill_cb (GObject *source_object,
guint32 size;
gsize count, remaining;
guint8 *buffer;
- BroadwayRequest request;
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
@@ -417,14 +416,10 @@ client_fill_cb (GObject *source_object,
while (remaining >= sizeof (guint32))
{
memcpy (&size, buffer, sizeof (guint32));
-
+
if (size <= remaining)
{
- g_assert (size >= sizeof (BroadwayRequestBase));
- g_assert (size <= sizeof (BroadwayRequest));
-
- memcpy (&request, buffer, size);
- client_handle_request (client, &request);
+ client_handle_request (client, (BroadwayRequest *)buffer);
remaining -= size;
buffer += size;