[Xcb-commit] xcb/proto: src

Christian Linhart clinhart at kemper.freedesktop.org
Tue Jan 24 10:10:38 UTC 2017


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

New commits:
commit a909451a51a907ee90969213a56e4e6ecc0b03de
Author: aarzilli <alessandro.arzilli at gmail.com>
Date:   Sun Sep 13 12:49:13 2015 +0200

    Add missing alignment padding to SetupRequest struct
    
    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.
    
    https://github.com/BurntSushi/xgb/issues/24
    
    Alessandro Arzilli.
    
    Reviewed-by: Christian Linhart <chris at demorecorder.com>

diff --git a/src/xproto.xml b/src/xproto.xml
index 437dc30..dea48df 100644
--- a/src/xproto.xml
+++ b/src/xproto.xml
@@ -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">


More information about the xcb-commit mailing list