Bug 23708 - XICheckInvalidMaskBits called with wrong parameters
Summary: XICheckInvalidMaskBits called with wrong parameters
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/other (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 06:35 UTC by Carlos Garnacho Parro
Modified: 2009-09-07 10:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (1.97 KB, patch)
2009-09-04 06:35 UTC, Carlos Garnacho Parro
no flags Details | Splinter Review

Description Carlos Garnacho Parro 2009-09-04 06:35:52 UTC
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.
Comment 1 Peter Hutterer 2009-09-06 19:27:06 UTC
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!
Comment 2 Carlos Garnacho Parro 2009-09-07 10:19:54 UTC
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.