Pass the correct buffer length to strlcpy() to avoid truncation.

Problem noticed by Edgar Pettijohn III, ok tb@
This commit is contained in:
matthieu 2018-10-28 19:38:19 +00:00
parent bb65f435ee
commit f9024c4d46

View File

@ -754,7 +754,7 @@ SetPrompt (Widget ctx, int promptNum, const char *message,
return -1; return -1;
} }
strlcpy(prompt, message, messageLen); strlcpy(prompt, message, messageLen + 3);
/* Make sure text prompts have at least two spaces at end */ /* Make sure text prompts have at least two spaces at end */
e = messageLen; e = messageLen;