mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-23 05:00:27 +02:00
Use safe version of sprintf and strcpy
This commit is contained in:
87 files changed
+402
-395
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user