Closed jigpu closed 8 months ago
merged, thanks!
Ok, I'm still staring at this and... this can't be right, button 31 is a legitimate button so the issue is elsewhere - and I found it, see #330. Sorry about that, my brain didn't really switch on until after the merge.
Automated test runs have detected the following issue while running UBSan checks:
While the faulty line has some protection against an excessively-large value of 'btn', the bounds are incorrect. A button number of 32 would be allowed by the existing check but would also lead to undefined behavior.
This commit modifies the bounds to properly fit the condition.
Link: https://github.com/linuxwacom/xf86-input-wacom/actions/runs/7049012015/job/19186502078