Browse Source

Fix buffer overflow in buf

Fix cmd overflow introduced in 186ce0f.

With a precision of %f being .6 and assuming a maximum (theoretical)
acceleration of 99999 we need 47 bytes including terminating byte.

Round it to 48
Yuri D'Elia 3 years ago
parent
commit
61faa49cbb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/Marlin_main.cpp

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -11247,7 +11247,7 @@ void restore_print_from_eeprom(bool mbl_was_active) {
 	int feedrate_rec;
 	int feedmultiply_rec;
 	uint8_t fan_speed_rec;
-	char cmd[30];
+	char cmd[48];
 	char filename[13];
 	uint8_t depth = 0;
 	char dir_name[9];