I've got a log object that takes a variable number of arguments..
void CLog::Log( const TCHAR* pcData ... )
{
va_list ap;
va_start(ap, pcData);
int iBuf = wcslen(pcData);
-iBuf could contain just a formatting string so is small
TCHAR cLogstrW[BUFSIZE];
UINT iRtn = wvsprintf( cLogstrW , pcData , ap );
wvsprintf copies more than BUFSIZE.
I need to prevent buffer overflows here - any suggestions?
Thanks