mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 06:08:22 +00:00
Input: atkbd - fix overrun in atkbd_set_repeat_rate()
This was introduced in commit 3d0f0fa0cb
:
bounds checking is performed against period[32] while indexing delay[4].
Spotted by Coverity, CID 1376.
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
2ffc1ccad8
commit
8ea371fb6d
1 changed files with 1 additions and 1 deletions
|
@ -498,7 +498,7 @@ static int atkbd_set_repeat_rate(struct atkbd *atkbd)
|
|||
i++;
|
||||
dev->rep[REP_PERIOD] = period[i];
|
||||
|
||||
while (j < ARRAY_SIZE(period) - 1 && delay[j] < dev->rep[REP_DELAY])
|
||||
while (j < ARRAY_SIZE(delay) - 1 && delay[j] < dev->rep[REP_DELAY])
|
||||
j++;
|
||||
dev->rep[REP_DELAY] = delay[j];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue