prevent buffer overflow in debug output

This commit is contained in:
Jens Tautenhahn 2016-06-14 15:42:18 +02:00
parent 60c1dd1744
commit 84fc451a78

View file

@ -395,7 +395,7 @@ int MCDECL sprtf( const char *pf, ... )
int i;
va_list arglist;
va_start(arglist, pf);
i = vsprintf( pb, pf, arglist );
i = vsnprintf( pb, M_MAX_SPRTF, pf, arglist );
va_end(arglist);
#ifdef _MSC_VER
prt(pb); // ensure CR/LF