summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-03-14 11:57:48 +0000
committerphintuka <phintuka>2007-03-14 11:57:48 +0000
commit3d499cc39ffa22f5253a03a22ea28e51bf0f0d06 (patch)
treed1ad122ee54b71e7798cc109228ae5d78d33e2f3
parentf4dbdb5b7b6fea8eb820971ddb26c1b44f8cc205 (diff)
downloadxineliboutput-3d499cc39ffa22f5253a03a22ea28e51bf0f0d06.tar.gz
xineliboutput-3d499cc39ffa22f5253a03a22ea28e51bf0f0d06.tar.bz2
Ensure string null termination
-rw-r--r--logdefs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/logdefs.h b/logdefs.h
index a75fde4b..0cbf170c 100644
--- a/logdefs.h
+++ b/logdefs.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: logdefs.h,v 1.6 2007-03-08 13:50:48 phintuka Exp $
+ * $Id: logdefs.h,v 1.7 2007-03-14 11:57:48 phintuka Exp $
*
*/
@@ -48,6 +48,7 @@
char buf[512];
va_start(argp, fmt);
vsnprintf(buf, 512, fmt, argp);
+ buf[sizeof(buf)-1] = 0;
# ifndef __APPLE__
if(!LogToSysLog) {
fprintf(stderr,"[%ld] " LOG_MODULENAME "%s\n", syscall(__NR_gettid), buf);