Skip to content

Commit

Permalink
Add missing alignment padding to SetupRequest struct
Browse files Browse the repository at this point in the history
Fields  AuthorizationProtocolName and AuthorizationProtocolData of
SetupRequest should be padded:

http://www.x.org/releases/current/doc/xproto/x11protocol.html#Encoding::Connection_Setup

The problem was discovered by github user pphaneuf while trying to use xgb
to write his own implementation of the connection handshake. Neither xgb
nor xcb actually use code generated for SetupRequest for the handshake,
which is why this bug went unnoticed.

BurntSushi/xgb#24

Alessandro Arzilli.

Reviewed-by: Christian Linhart <chris@demorecorder.com>
  • Loading branch information
aarzilli authored and Christian Linhart committed Jan 24, 2017
1 parent 95a262e commit a909451
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xproto.xml
Expand Up @@ -198,9 +198,11 @@ authorization from the authors.
<list type="char" name="authorization_protocol_name">
<fieldref>authorization_protocol_name_len</fieldref>
</list>
<pad align="4" />
<list type="char" name="authorization_protocol_data">
<fieldref>authorization_protocol_data_len</fieldref>
</list>
<pad align="4" />
</struct>

<struct name="SetupFailed">
Expand Down

0 comments on commit a909451

Please sign in to comment.