From 560d5cd7b14298e59ef6da3ce62352a47c8a585c Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 26 Sep 2024 12:40:00 +0100 Subject: [PATCH] use strncpy instead of strcpy --- src/zen/ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zen/ui.c b/src/zen/ui.c index cfd9e45..2212515 100644 --- a/src/zen/ui.c +++ b/src/zen/ui.c @@ -263,7 +263,7 @@ void draw_users() strncpy(line, seluser.name, (MAX_NAME / 2) - 2); strncat(line, "..", 2); } else { - strcpy(line, seluser.name); + strncpy(line, seluser.name, name_len); } int color = users->items[i].color;