mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
qnx: fixed potential buffer overflow.
This commit is contained in:
parent
22241ed0b0
commit
200f782cab
@ -107,7 +107,7 @@ handleKeyboardEvent(screen_event_t event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip unrecognized keys.
|
// Skip unrecognized keys.
|
||||||
if ((val < 0) || (val > (sizeof(key_to_sdl) / sizeof(int)))) {
|
if ((val < 0) || (val >= SDL_TABLESIZE(key_to_sdl))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user