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
commit633b15caf3f616f7778ca153573097fcb7fdfad0 (patch)
tree815e6926a369936b4b60e6dd6c09707094a4a426 /src/music
parentda0a0ef8ca740e9d23b71a1b02c4fc0c7512eaec (diff)
downloadopenttd-633b15caf3f616f7778ca153573097fcb7fdfad0.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);
}