0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-22 17:52:57 +00:00

🚨Fix buffer overrun warning in UBL (#26984)

to account for null terminator
This commit is contained in:
Chris 2024-04-20 23:43:31 +02:00 committed by GitHub
parent 02ba6f9f3a
commit b4a95db7da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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));