Created attachment 29214 [details] [review] patch AFAICS mask_len is specified in bytes, and XICheckInvalidMaskBits takes the mask_len parameter in bytes as well, so multiplying it by 4 in the callers seems to make the function check random memory, which is likely to have enabled bits. I'm attaching a patch that makes XI2 grabs not fail with correct masks for me.
mask_len is specified in bytes, but only for the libXi interface. the protocol is in 4-byte units. The real issue was in libXi, for XIGrabDevice it calculated the mask len wrong. Pushed as 369600cf37cd884793c4802a56c8355bc1812dc6. Please verify that this is fixed now and close the bug if it is. Thanks for reporting!
Doh! right, should have checked the wire protocol spec :), your patch indeed fixes the issue, thanks! closing as FIXED.
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.