瀏覽代碼

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 年之前
父節點
當前提交
61faa49cbb
共有 1 個文件被更改,包括 1 次插入1 次删除
  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];