diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2018-10-28 19:38:20 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2020-07-14 15:52:43 +0200 |
commit | cd9e5d7e78ffd9f95c5fbaca3a173054b2eab66a (patch) | |
tree | 2bb35d74e48260113b15785fb89f003b7b6eb5f4 | |
parent | e55b56f5693d38cd21a9c70c71d6d12a3f10d08d (diff) |
Pass the correct buffer length to strlcpy() to avoid truncation. Problem noticed by Edgar Pettijohn III, ok tb@
-rw-r--r-- | greeter/Login.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |