diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2018-10-28 19:38:20 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2018-10-28 19:38:20 +0000 |
commit | 9cba5030f37329b9f14dde90d9cb4fd7b4db8f35 (patch) | |
tree | fab2e01385a94acca2624ea867a238d658a3bf78 /app/xenodm | |
parent | 9eb8d1404cb0a1fb66fd13585dc599ab141d1dd2 (diff) |
Pass the correct buffer length to strlcpy() to avoid truncation.
Problem noticed by Edgar Pettijohn III, ok tb@
Diffstat (limited to 'app/xenodm')
-rw-r--r-- | app/xenodm/greeter/Login.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/xenodm/greeter/Login.c b/app/xenodm/greeter/Login.c index ce4e8a4b5..6ac176507 100644 --- a/app/xenodm/greeter/Login.c +++ b/app/xenodm/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; |