Merge pull request #422 from sesom42/master

prevent buffer overflow in debug output
This commit is contained in:
Geoff McLane 2016-06-30 18:32:55 +02:00 committed by GitHub
commit 7bec2c2082

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