Fix reporter using part of the actual message as a format string

When not reporting via events, the final contents of the message buffer
after formatting was being used as a format string to fprintf instead of
writing out the actual string.
This commit is contained in:
Jon Siwek 2011-08-10 12:28:36 -05:00 committed by Robin Sommer
parent 33b064bdb2
commit 00de88f4cb
3 changed files with 12 additions and 1 deletions

View file

@ -302,7 +302,7 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out, Conne
s += buffer;
s += "\n";
fprintf(out, s.c_str());
fprintf(out, "%s", s.c_str());
}
if ( alloced )