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 | 633b15caf3f616f7778ca153573097fcb7fdfad0 (patch) | |
tree | 815e6926a369936b4b60e6dd6c09707094a4a426 /src/music | |
parent | da0a0ef8ca740e9d23b71a1b02c4fc0c7512eaec (diff) | |
download | openttd-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.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); } |