validate strftime format string input (when necessary)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9985 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-10-12 21:51:51 +00:00
parent a21b5ed2ad
commit 1f47ff15b3
14 changed files with 92 additions and 28 deletions

View File

@@ -289,7 +289,7 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, const
}
switch_time_exp_lt(&tm, switch_timestamp_now());
switch_strftime(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
if (channel == SWITCH_CHANNEL_ID_LOG) {
fprintf(handle, "[%d] %s %s:%d %s() %s", (int) getpid(), date, filep, line, func, data);