diff options
author | marha <marha@users.sourceforge.net> | 2009-11-20 13:41:37 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-20 13:41:37 +0000 |
commit | 5c8f4784b916c0077cda3975851e3dbbabe22451 (patch) | |
tree | 2ebdf32d83c1a293494a52896b4f13be19918c7f /xorg-server/os/log.c | |
parent | d2d9977f1153b5222b34859a2cb22b957bfe3221 (diff) | |
download | vcxsrv-5c8f4784b916c0077cda3975851e3dbbabe22451.tar.gz vcxsrv-5c8f4784b916c0077cda3975851e3dbbabe22451.tar.bz2 vcxsrv-5c8f4784b916c0077cda3975851e3dbbabe22451.zip |
Make sure no data out of the buffer is logged.
Diffstat (limited to 'xorg-server/os/log.c')
-rw-r--r-- | xorg-server/os/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index 01bc4fe53..c0fdb5703 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -271,7 +271,8 @@ LogVWrite(int verb, const char *f, va_list args) * stream(s). */ if (verb < 0 || logFileVerbosity >= verb || logVerbosity >= verb) { - vsnprintf(tmpBuffer, sizeof(tmpBuffer), f, args); + vsnprintf(tmpBuffer, sizeof(tmpBuffer)-1, f, args); + tmpBuffer[sizeof(tmpBuffer)-1]=0; len = strlen(tmpBuffer); } if ((verb < 0 || logVerbosity >= verb) && len > 0) |