From 06977d788cee33489d44b8ab96dfbf2d9f30236b Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 8 Nov 2014 13:34:45 +0000 Subject: [PATCH] Fixed regression introduced in r18356 (CVE-2011-4612): client duration time is now correctly logged. PRIu64 MUST NOT be used with log_write_direct() as depending on platform PRIu64 may be using something not supported by __vsnprintf() of log/log.c. close #2081, see r18356 svn path=/icecast/trunk/icecast/; revision=19287 --- src/logging.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logging.c b/src/logging.c index 10da0548..d82cbfb0 100644 --- a/src/logging.c +++ b/src/logging.c @@ -152,7 +152,7 @@ void logging_access(client_t *client) user_agent = "-"; log_write_direct (accesslog, - "%s - %H [%s] \"%H %H %H/%H\" %d %" PRIu64 " \"% H\" \"% H\" %lu", + "%s - %H [%s] \"%H %H %H/%H\" %d %llu \"% H\" \"% H\" %llu", client->con->ip, username, datebuf, @@ -161,10 +161,10 @@ void logging_access(client_t *client) httpp_getvar (client->parser, HTTPP_VAR_PROTOCOL), httpp_getvar (client->parser, HTTPP_VAR_VERSION), client->respcode, - client->con->sent_bytes, + (long long unsigned int)client->con->sent_bytes, referrer, user_agent, - (unsigned long)stayed); + (long long unsigned int)stayed); } /* This function will provide a log of metadata for each mountpoint. The metadata *must* be in UTF-8, and thus