forked from kofal.net/zmk
fix(hid): Correct off-by-one buffer overflow with NKRO
This commit is contained in:
committed by
Pete Johanson
parent
a9021deef6
commit
e22bc7620c
@@ -126,7 +126,7 @@ zmk_hid_boot_report_t *zmk_hid_get_boot_report(void) {
|
||||
memset(&boot_report.keys, 0, HID_BOOT_KEY_LEN);
|
||||
int ix = 0;
|
||||
uint8_t base_code = 0;
|
||||
for (int i = 0; i < (ZMK_HID_KEYBOARD_NKRO_MAX_USAGE + 1) / 8; ++i) {
|
||||
for (int i = 0; i < sizeof(keyboard_report.body.keys); ++i) {
|
||||
if (ix == keys_held) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user