Pass the correct buffer length to strlcpy() to avoid truncation.
Problem noticed by Edgar Pettijohn III, ok tb@
This commit is contained in:
parent
bb65f435ee
commit
f9024c4d46
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user