(svn r27290) -Fix: sanitize the command line arguments before doing anything complex with them

This commit is contained in:
rubidium
2015-05-20 18:18:26 +00:00
parent d05ac99d52
commit 10466746b4
3 changed files with 9 additions and 2 deletions

View File

@@ -174,6 +174,9 @@ int CDECL main(int argc, char *argv[])
{
SetRandomSeed(time(NULL));
/* Make sure our arguments contain only valid UTF-8 characters. */
for (int i = 0; i < argc; i++) ValidateString(argv[i]);
return openttd_main(argc, argv);
}