evdev: fix off-by-one error in decode_bitset
* evdev.c (decode_bitset): Decrement sorted/indexed xlat's size by one in order to account for guarding XLAT_END, as other sorted/indexed xlat wrappers do. Fixes: v4.23~261 "evdev: support various types of xlats in decode_bitset"
This commit is contained in:
parent
f6869581d4
commit
8a5feb1cb3
2
evdev.c
2
evdev.c
@ -188,7 +188,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
|
||||
#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
|
||||
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
|
||||
(dflt_), ARRAY_SIZE(decode_nr_), (xt_))
|
||||
(dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
|
||||
|
||||
# ifdef EVIOCGMTSLOTS
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user