From 59a7dad7a569c501660515a31c8b7fee9a2404f5 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 8 Nov 2024 04:48:25 +0000 Subject: [PATCH] GUI: Replace `strcat()` usage with `strlcat()` --- 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 b4a9ce46e..2884c1257 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -327,7 +327,7 @@ static void text_input_view_draw_callback(Canvas* canvas, void* _model) { while(len && canvas_string_width(canvas, str) > needed_string_width) { str[len--] = '\0'; } - strcat(str, "..."); + strlcat(str, "...", sizeof(buf) - (str - buf)); } canvas_draw_str(canvas, start_pos, 22, str);