replace vsprintf with vsnprintf in CONS_Printf
fixes a buffer overrun that can occur when printing extremely long strings crash found by Lat, cause diagnosed by X.Organic
This commit is contained in:
parent
8ae23099d1
commit
421099f68e
1 changed files with 1 additions and 1 deletions
|
|
@ -1252,7 +1252,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);
|
||||
|
||||
Lock_state();
|
||||
|
|
|
|||
Loading…
Reference in a new issue