]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
switch_xml: snprintf size fix
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Mon, 25 Oct 2010 19:21:39 +0000 (15:21 -0400)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Mon, 25 Oct 2010 19:21:39 +0000 (15:21 -0400)
src/switch_xml.c

index 95b82cb20d190fd05db63ff4ce29872c961d6f63..a7bfe413d06477fbed07cf5729facf17a82aec21 100644 (file)
@@ -2761,7 +2761,7 @@ SWITCH_DECLARE(int) switch_xml_std_datetime_check(switch_xml_t xcond) {
        if (time_match && xtod) {
                int test = (tm.tm_hour * 60 * 60) + (tm.tm_min * 60) + tm.tm_sec;
                char tmpdate[10];
-               switch_snprintf(tmpdate, 6, "%d:%d:%d", tm.tm_hour, tm.tm_min, tm.tm_sec);
+               switch_snprintf(tmpdate, 10, "%d:%d:%d", tm.tm_hour, tm.tm_min, tm.tm_sec);
                time_match = switch_tod_cmp(xtod, test);
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG9,
                                "XML DateTime Check: time of day[%s] =~ %s (%s)\n", tmpdate, xtod, time_match ? "PASS" : "FAIL");