Bug 93273

Summary: OrderEvents and OrderModifiers triggers undefined behavior
Product: xorg Reporter: Yury Gribov <tetra2005>
Component: Lib/XtAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: tetra2005
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Yury Gribov 2015-12-06 16:27:12 UTC
OrderEvents and OrderModifiers comparison functions (both from src/TMparse.c) return 1 for equal arguments. This violates requirements to qsort's comparison function (which must be a total ordering) and causes UB at runtime. In practice this may mean strange misbehaviors.

The issue can be easily fixed by adding one more check for equal signature fields.
Comment 1 GitLab Migration User 2018-08-10 20:02:04 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libxt/issues/9.

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.