summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/lcd-bitmap-common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 3495e04964..26491e78e8 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -262,8 +262,7 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
s->start_tick = current_tick + LCDFN(scroll_info).delay;
s->style = style;
- memset(s->line, 0, sizeof s->line);
- strcpy(s->line, string);
+ strlcpy(s->line, string, sizeof s->line);
/* get width */
s->width = LCDFN(getstringsize)(s->line, &w, &h);