Skip to content

Don't overrun the chances array when synching > MAX_SLOTS

Peter Hutterer requested to merge whot/libevdev:wip/num-slots-overrun into master

On a device with more than 256 slots we would read (and copy) past our changes stack-allocated changes array. Fix this by capping to MAX_SLOTS though this also requires us to memset the target where it is larger than MAX_SLOTS.

There are no real devices with 256+ slots, so this is a theoretical issue only.

Fixes #11 (closed)

cc @mforney

Merge request reports