Use safe version of sprintf and strcpy

This commit is contained in:
smallmodel committed 2024-09-20 23:08:53 +02:00
1 parent a69d9d4483
commit f9d264058b
87 files changed
+402 -395

No files matched your search

+2 -2
View File
@@ -1798,7 +1798,7 @@ void DM_Manager::InsertEntry(const char *entry)
size_t len = strlen(entry);
if (scoreLength + len < MAX_STRING_CHARS) {
strcpy(scoreString + scoreLength, entry);
Q_strncpyz(scoreString + scoreLength, entry, sizeof(scoreString) - scoreLength);
scoreLength += len;
scoreEntries++;
@@ -1810,7 +1810,7 @@ void DM_Manager::InsertEntryNoCount(const char *entry)
size_t len = strlen(entry);
if (scoreLength + len < MAX_STRING_CHARS) {
strcpy(scoreString + scoreLength, entry);
Q_strncpyz(scoreString + scoreLength, entry, sizeof(scoreString) - scoreLength);
scoreLength += len;
}