Skip to content

Commit

Permalink
🚨Fix buffer overrun warning in UBL (#26984)
Browse files Browse the repository at this point in the history
to account for null terminator
  • Loading branch information
shadow578 authored Apr 20, 2024
1 parent 02ba6f9 commit b4a95db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/menu/menu_ubl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void _lcd_ubl_custom_mesh() {
* UBL Adjust Mesh Height Command
*/
void _lcd_ubl_adjust_height_cmd() {
char ubl_lcd_gcode[13];
char ubl_lcd_gcode[14];
const int ind = ubl_height_amount > 0 ? 6 : 7;
strcpy_P(ubl_lcd_gcode, PSTR("G29P6C-"));
sprintf_P(&ubl_lcd_gcode[ind], PSTR(".%i"), ABS(ubl_height_amount));
Expand Down

0 comments on commit b4a95db

Please sign in to comment.