XEventClass is typedef'd as an "unsigned long", therefore, on an Alpha, this is a 64-bit long cardinal, i.e. 8 bytes long. Unfortunately, in the XGetDeviceDontPropagateList function, when the list of XEventClass entries is allocated, the number of bytes is only (rep.length << 2), i.e. rep.length*4. Instead, the proper number of bytes to allocate for the list would be "rep.length * sizeof(XEventClass). With the current code, the memory allocated for the list will be overwritten on a 64-bit machine like the Compaq Alpha. The function XGetSelectedExtensionEvents (in lib/Xi/XGtSelect.c) uses the correct computation as suggested above.
Created attachment 131 [details] [review] fix for XGetDeviceDontPropagateList() on 64-Bit machines
Thanks for catching this!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.