]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fix buffer overrun in lcd_keyframes
authorFred Sundvik <fsundvik@gmail.com>
Thu, 13 Apr 2017 18:40:06 +0000 (21:40 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Thu, 13 Apr 2017 18:40:06 +0000 (21:40 +0300)
This would often cause the keyboard to crash when restarting the
computer.

quantum/visualizer/lcd_keyframes.c

index df11861ddc96256da0086c54852ca2c8cff8d4d5..82e4184d2ca2f38b924e39512cdfe5a0510ab8b1 100644 (file)
@@ -125,8 +125,8 @@ static void get_led_state_string(char* output, visualizer_state_t* state) {
        pos += 5;
     }
     if (state->status.leds & (1u << USB_LED_KANA)) {
-       memcpy(output + pos, "KANA ", 5);
-       pos += 5;
+       memcpy(output + pos, "KANA", 4);
+       pos += 4;
     }
     output[pos] = 0;
 }