summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-10-28 16:04:41 +0000
committerrubidium <rubidium@openttd.org>2008-10-28 16:04:41 +0000
commitdb1fd2e0850d3720ac715df9b86107011a9657fd (patch)
tree815e6926a369936b4b60e6dd6c09707094a4a426 /src/music
parent56d0990d62ef2910e4254fbc432f505530a70cd6 (diff)
downloadopenttd-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.cpp2
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);
}