From cd9e5d7e78ffd9f95c5fbaca3a173054b2eab66a Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 28 Oct 2018 19:38:20 +0000 Subject: Pass the correct buffer length to strlcpy() to avoid truncation. Problem noticed by Edgar Pettijohn III, ok tb@ --- greeter/Login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/greeter/Login.c b/greeter/Login.c index ce4e8a4..6ac1765 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -754,7 +754,7 @@ SetPrompt (Widget ctx, int promptNum, const char *message, return -1; } - strlcpy(prompt, message, messageLen); + strlcpy(prompt, message, messageLen + 3); /* Make sure text prompts have at least two spaces at end */ e = messageLen; -- cgit v1.2.3