diff options
author | smatz <smatz@openttd.org> | 2008-07-28 15:17:47 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-07-28 15:17:47 +0000 |
commit | 1adcf9c81b125e818947d3e2dfad6a678bb0ec3e (patch) | |
tree | 900ab95dd6ab6b52e8d8ae8750c2df0a3abeb025 /src | |
parent | 3c96d47c36a5cefbf07917a14ddb6728a7dc39ac (diff) | |
download | openttd-1adcf9c81b125e818947d3e2dfad6a678bb0ec3e.tar.xz |
(svn r13858) -Fix: buffer overflow for too long filename supplied as '-g' parameter
Diffstat (limited to 'src')
-rw-r--r-- | src/openttd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 29c230c8e..7eb61c226 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -458,7 +458,7 @@ int ttd_main(int argc, char *argv[]) case 'i': _use_dos_palette = true; break; case 'g': if (mgo.opt != NULL) { - strcpy(_file_to_saveload.name, mgo.opt); + ttd_strlcpy(_file_to_saveload.name, mgo.opt, sizeof(_file_to_saveload.name)); _switch_mode = SM_LOAD; } else { _switch_mode = SM_NEWGAME; |