*** empty log message ***

svn path=/trunk/boinc/; revision=1311
This commit is contained in:
Eric Heien 2003-06-05 22:06:43 +00:00
parent 12ad333ee2
commit e8573f0f57
1 changed files with 3 additions and 1 deletions

View File

@ -1667,8 +1667,10 @@ void msg_printf(PROJECT *p, int priority, char *fmt, ...) {
if (fmt == NULL) return;
// TODO: This is vulnerable to buffer overruns - FIX IT!
// Since Windows doesn't support vsnprintf, we have to do a
// workaround to prevent buffer overruns
//
if (strlen(fmt) > 512) fmt[511] = '\0';
va_start(ap, fmt); // Parses string for variables
vsprintf(buf, fmt, ap); // And convert symbols To actual numbers
va_end(ap); // Results are stored in text