mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
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:
@@ -571,7 +571,7 @@ SWITCH_DECLARE(switch_status_t) switch_strftime_tz(const char *tz, const char *f
|
||||
if (tzdef) { /* The lookup of the zone may fail. */
|
||||
tztime( &timep, tzdef, &tm );
|
||||
tm2switchtime( &tm, &stm );
|
||||
switch_strftime(date, &retsize, len, switch_strlen_zero(format) ? "%Y-%m-%d %T" : format, &stm);
|
||||
switch_strftime_nocheck(date, &retsize, len, switch_strlen_zero(format) ? "%Y-%m-%d %T" : format, &stm);
|
||||
if (!switch_strlen_zero_buf(date)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user