Build: Fix #1640: Change strcpy to snprintf.

This commit is contained in:
John Kessenich 2019-02-18 22:25:58 -07:00
parent 9f538c7207
commit bce1f51096
2 changed files with 6 additions and 6 deletions

View file

@ -866,8 +866,7 @@ int TPpContext::CPPextension(TPpToken* ppToken)
if (token != PpAtomIdentifier)
parseContext.ppError(ppToken->loc, "extension name expected", "#extension", "");
assert(strlen(ppToken->name) <= MaxTokenLength);
strcpy(extensionName, ppToken->name);
snprintf(extensionName, sizeof(extensionName), "%s", ppToken->name);
token = scanToken(ppToken);
if (token != ':') {