diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2017-04-13 21:40:06 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2017-04-13 21:40:06 +0300 |
commit | 5c251b5575a5008c81b35cd31313591c4910722a (patch) | |
tree | 6401bf6fe43e903890cdf4c5fb00115e29763fc9 | |
parent | 41a46c7c8e4aa2470c245cbe09deb57c0720698e (diff) | |
download | qmk_firmware-5c251b5575a5008c81b35cd31313591c4910722a.tar.gz qmk_firmware-5c251b5575a5008c81b35cd31313591c4910722a.zip |
Fix buffer overrun in lcd_keyframes
This would often cause the keyboard to crash when restarting the
computer.
-rw-r--r-- | quantum/visualizer/lcd_keyframes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c index df11861dd..82e4184d2 100644 --- a/quantum/visualizer/lcd_keyframes.c +++ b/quantum/visualizer/lcd_keyframes.c | |||
@@ -125,8 +125,8 @@ static void get_led_state_string(char* output, visualizer_state_t* state) { | |||
125 | pos += 5; | 125 | pos += 5; |
126 | } | 126 | } |
127 | if (state->status.leds & (1u << USB_LED_KANA)) { | 127 | if (state->status.leds & (1u << USB_LED_KANA)) { |
128 | memcpy(output + pos, "KANA ", 5); | 128 | memcpy(output + pos, "KANA", 4); |
129 | pos += 5; | 129 | pos += 4; |
130 | } | 130 | } |
131 | output[pos] = 0; | 131 | output[pos] = 0; |
132 | } | 132 | } |