diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-10-23 19:32:42 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-11-03 13:19:47 +1000 |
commit | 6e2f5912b6ab54a5d78c7dfddc558e0bed08e270 (patch) | |
tree | 11c7de853b482bb94cd2cc0f5d4dfd3669f8184b | |
parent | 48329b2c5c7e3ffa1e9230fd712aec2cd7c2e620 (diff) |
dmx: Correctly compute DMXGetScreenAttributes reply length
Correctly allow for excess length of DMXGetScreenAttributes reply
over standard 32 byte reply in addition to the displayName string
when computing the length of reply
http://bugs.freedesktop.org/show_bug.cgi?id=24685
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 50a5c32430a5267f2a05656d2417f9a8a44d8b97)
-rw-r--r-- | hw/dmx/dmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c index 1a0c3fea8..9f0285544 100644 --- a/hw/dmx/dmx.c +++ b/hw/dmx/dmx.c @@ -362,7 +362,8 @@ static int ProcDMXGetScreenAttributes(ClientPtr client) paddedLength = pad_to_int32(length); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = bytes_to_int32(paddedLength); + rep.length = bytes_to_int32((sizeof(xDMXGetScreenAttributesReply) - sizeof(xGenericReply)) + + paddedLength); rep.displayNameLength = length; if (client->swapped) { |