Manager: fix crashing bug

Don't do fprintf(stdout, msg).
If msg contains %, this will crash.
Instead do fprintf(stdout, "%s", msg).
This commit is contained in:
David Anderson 2015-11-11 10:55:51 -08:00
parent 3c8ceb028d
commit 1f599f9ec4
1 changed files with 2 additions and 2 deletions

View File

@ -125,12 +125,12 @@ int __cdecl boinc_message_reporting(int reportType, char *szMsg, int *retVal){
case _CRT_ERROR:
if (flags & BOINC_DIAG_TRACETOSTDERR) {
n = fprintf(stderr, szMsg);
n = fprintf(stderr, "%s", szMsg);
if (n > 0) stderr_file_size += n;
}
if (flags & BOINC_DIAG_TRACETOSTDOUT) {
n = fprintf(stdout, szMsg);
n = fprintf(stdout, "%s", szMsg);
if (n > 0) stdout_file_size += n;
}