From 3d499cc39ffa22f5253a03a22ea28e51bf0f0d06 Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 14 Mar 2007 11:57:48 +0000 Subject: Ensure string null termination --- logdefs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3