]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed a buffer overflow in SV_BroadcastPrintf
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 8 Jul 2003 10:04:59 +0000 (10:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 8 Jul 2003 10:04:59 +0000 (10:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3190 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 9a679db3e14cfddd715738d38c3e2c96107a99bd..3bd6992f8649d547f86f22a8a96d5d4386a172bf 100644 (file)
--- 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<svs.maxclients ; i++)