CID 22558: Copy into fixed size buffer (STRING_OVERFLOW)

bsdstring buffer size check
This commit is contained in:
Enno Rehling 2015-10-30 11:41:59 +01:00
parent 1fb04179dc
commit 5d273e475e
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ const char *dbrace(const struct race *rc)
char *zPtr = zText;
/* the english names are all in ASCII, so we don't need to worry about UTF8 */
strcpy(zText, (const char *)LOC(get_locale("en"), rc_name_s(rc, NAME_SINGULAR)));
strlcpy(zText, (const char *)LOC(get_locale("en"), rc_name_s(rc, NAME_SINGULAR)), sizeof(zText));
while (*zPtr) {
*zPtr = (char)(toupper(*zPtr));
++zPtr;