From 65d487c60b6e99b2c7bad83d6b261c6419d96c8a 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 7f6a6f68a..ae4c89bb9 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