OrderEvents and OrderModifiers triggers undefined behavior
Submitted by Yury Gribov
Assigned to Xorg Project Team
Description
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.
Version: git