[coverity] 1543235 Out-of-bounds access

This commit is contained in:
akallabeth 2024-04-11 10:45:28 +02:00 committed by akallabeth
parent 61e0d122b7
commit 80c562d040

View File

@ -180,7 +180,7 @@ void xf_keyboard_key_press(xfContext* xfc, const XKeyEvent* event, KeySym keysym
WINPR_ASSERT(xfc);
WINPR_ASSERT(event);
WINPR_ASSERT(event->keycode <= ARRAYSIZE(xfc->KeyboardState));
WINPR_ASSERT(event->keycode < ARRAYSIZE(xfc->KeyboardState));
last = xfc->KeyboardState[event->keycode];
xfc->KeyboardState[event->keycode] = TRUE;