From 939084d57b3dcd937b5ef8f9ee31c667983ae046 Mon Sep 17 00:00:00 2001 From: Indev Date: Thu, 12 Dec 2024 18:47:35 +0300 Subject: [PATCH] Avoid overflowing CONS_Printf's buffer by using vsnprintf --- src/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/console.c b/src/console.c index 9781078fa..f36b3b7cb 100644 --- a/src/console.c +++ b/src/console.c @@ -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