buffer overflow
This commit is contained in:
stefanbode 2022-08-03 19:03:42 +02:00 committed by GitHub
parent f54e0f26f4
commit f637dd14aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1767,7 +1767,7 @@ bool Xdrv27(uint8_t function)
}
break;
case FUNC_BUTTON_PRESSED:
if (Settings->shutter_button[XdrvMailbox.index] & (1<<31)) {
if (XdrvMailbox.index < MAX_SHUTTER_KEYS && Settings->shutter_button[XdrvMailbox.index] & (1<<31)) {
ShutterButtonHandler();
result = true;
}