(svn r6884) -Codechange: Add strict bounds checking in string formatting system.

The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
This commit is contained in:
Darkvater
2006-10-21 23:31:34 +00:00
parent 7f36a980c7
commit ee27bb497c
33 changed files with 240 additions and 231 deletions

View File

@@ -504,7 +504,7 @@ static char *MakeScreenshotName(const char *ext)
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
SetDParam(2, _date);
GetString(_screenshot_name, STR_4004);
GetString(_screenshot_name, STR_4004, lastof(_screenshot_name));
}
base = strchr(_screenshot_name, 0);