From: havoc Date: Tue, 8 Jul 2003 10:04:59 +0000 (+0000) Subject: fixed a buffer overflow in SV_BroadcastPrintf X-Git-Tag: xonotic-v0.1.0preview~6556 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=870bcd940076b703294502019a2799440f50f6ef;p=xonotic%2Fdarkplaces.git fixed a buffer overflow in SV_BroadcastPrintf git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3190 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 9a679db3..3bd6992f 100644 --- a/host.c +++ b/host.c @@ -362,11 +362,11 @@ Sends text to all active clients void SV_BroadcastPrintf(const char *fmt, ...) { va_list argptr; - char string[1024]; + char string[4096]; int i; va_start(argptr,fmt); - vsprintf(string, fmt,argptr); + vsnprintf(string, sizeof(string), fmt,argptr); va_end(argptr); for (i=0 ; i