Skip to content

Commit

Permalink
Fix potential buffer overflow in status_screen_DOGM.cpp
Browse files Browse the repository at this point in the history
A compiler warning in about a buffer being too small led me to here.
  • Loading branch information
soligen2010 authored Dec 18, 2023
1 parent 0b0debb commit 13d200f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/status_screen_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const

#if HAS_TIME_DISPLAY
static void prepare_time_string(const duration_t &time, char prefix) {
char str[10];
char str[13];
const uint8_t time_len = time.toDigital(str, time.value >= 60*60*24L); // 5 to 8 chars
progressString.set(prefix, ':', spaces_t(10 - time_len), str); // 2 to 5 spaces
}
Expand Down

0 comments on commit 13d200f

Please sign in to comment.