Anders Posted January 4, 2003 found this in c_io.c C_Printf. unsigned char tempstr[10240]; ... vsprintf(tempstr, s, args); this could cause an overflow, but this is easily fixed by using vsnprintf(tempstr, 10240, s, args) instead. 0 Share this post Link to post
fraggle Posted January 4, 2003 My fault :P And dont you mean vsnprintf(tempstr, 10239, s, args) 0 Share this post Link to post
Anders Posted January 5, 2003 no, it will take the size of the buffer, it will leave room for the zero automagicaly. 0 Share this post Link to post
Anders Posted January 5, 2003 oh, and the retards at ms, who like to complicate things call it _vsnprintf instead. 0 Share this post Link to post
Arioch Posted January 5, 2003 #ifdef __MSVC__ #define vsnprintf _vsnprintf #endif or something similar 0 Share this post Link to post