Avoid overflowing CONS_Printf's buffer by using vsnprintf

This commit is contained in:
indev authored and Alug committed 2024-12-12 16:50:49 +01:00
1 parent c489cfb657
commit 65d487c60b
1 file changed
+1 -1
+1 -1
View File
@@ -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