diff options
author | rubidium <rubidium@openttd.org> | 2008-10-28 16:04:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-10-28 16:04:41 +0000 |
commit | db1fd2e0850d3720ac715df9b86107011a9657fd (patch) | |
tree | 815e6926a369936b4b60e6dd6c09707094a4a426 /src/music | |
parent | 56d0990d62ef2910e4254fbc432f505530a70cd6 (diff) | |
download | openttd-db1fd2e0850d3720ac715df9b86107011a9657fd.tar.xz |
(svn r14542) -Codechange: replace some sprintf with s[en]printf to make sure they will not overflow their buffers.
Diffstat (limited to 'src/music')
-rw-r--r-- | src/music/os2_m.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/music/os2_m.cpp b/src/music/os2_m.cpp index 4461f003f..d4ceb23e8 100644 --- a/src/music/os2_m.cpp +++ b/src/music/os2_m.cpp @@ -27,7 +27,7 @@ static long CDECL MidiSendCommand(const char *cmd, ...) va_list va; char buf[512]; va_start(va, cmd); - vsprintf(buf, cmd, va); + vseprintf(buf, lastof(buf), cmd, va); va_end(va); return mciSendString(buf, NULL, 0, NULL, 0); } |