Paranoia: Add destination buffer size to Engine::errorString to help avoiding buffer overflows.
svn-id: r35072
This commit is contained in:
parent
486523af51
commit
478ee06fb8
5 changed files with 8 additions and 8 deletions
|
@ -251,8 +251,8 @@ bool Engine::shouldPerformAutoSave(int lastSaveTime) {
|
|||
return autosavePeriod != 0 && diff > autosavePeriod * 1000;
|
||||
}
|
||||
|
||||
void Engine::errorString(const char *buf1, char *buf2) {
|
||||
strcpy(buf2, buf1);
|
||||
void Engine::errorString(const char *buf1, char *buf2, int size) {
|
||||
strncpy(buf2, buf1, size);
|
||||
}
|
||||
|
||||
void Engine::pauseEngine(bool pause) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue