aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/log.c')
-rw-r--r--xorg-server/os/log.c3
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)