[Xcb] [PATCH] Add missing alignment padding to SetupRequest struct

aarzilli alessandro.arzilli at gmail.com
Sun Sep 13 03:49:13 PDT 2015

Fields  AuthorizationProtocolName and AuthorizationProtocolData of
SetupRequest should be padded:


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.


Alessandro Arzilli.

 src/xproto.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xproto.xml b/src/xproto.xml
index bfb8a4c..143318b 100644
--- a/src/xproto.xml
+++ b/src/xproto.xml
@@ -195,9 +195,11 @@ authorization from the authors.
     <list type="char" name="authorization_protocol_name">
+    <pad align="4" />
     <list type="char" name="authorization_protocol_data">
+    <pad align="4" />
   <struct name="SetupFailed">

More information about the Xcb mailing list