Avoid overflowing CONS_Printf's buffer by using vsnprintf
This commit is contained in:
1 parent
c489cfb657
commit
65d487c60b
1 file changed
+1
-1
+1
-1
@@ -1236,7 +1236,7 @@ void CONS_Printf(const char *fmt, ...)
|
||||
txt = malloc(8192);
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(txt, fmt, argptr);
|
||||
vsnprintf(txt, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
// echo console prints to log file
|
||||
|
||||
Reference in new issue
Block a user