Xi: Remove redundant and incorrect butmap range check
Maps are CARD8s, therefore checking for values above 255 is completely
unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't
even correct to begin with. This fixes bug #22392, which was uncovered
by commit 280b7f92d7
.
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
96706c24bd
commit
07154db4a8
|
@ -54,12 +54,6 @@ check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out,
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
|
if (dev->button->map[i + 1] != map[i] && dev->button->down[i + 1])
|
||||||
return MappingBusy;
|
return MappingBusy;
|
||||||
|
|
||||||
if (map[i] < 1 || map[i] > 255) {
|
|
||||||
if (errval_out)
|
|
||||||
*errval_out = map[i];
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user