From 04f9811c6e1b017e5b776572d591369e33419ae2 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Mon, 29 May 2023 14:17:50 +0300 Subject: [PATCH] Fix crash when renaming files with long file name --- applications/services/gui/modules/text_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/services/gui/modules/text_input.c b/applications/services/gui/modules/text_input.c index 3e521c356..446730e95 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -175,7 +175,7 @@ static void text_input_view_draw_callback(Canvas* canvas, void* _model) { canvas_draw_str(canvas, 2, 8, model->header); elements_slightly_rounded_frame(canvas, 1, 12, 126, 15); - char buf[model->text_buffer_size + 1]; + char buf[text_length + 1]; if(model->text_buffer) { strlcpy(buf, model->text_buffer, sizeof(buf)); }