From 06bccf280147802792792b959bfdcd98195993cc Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 29 Mar 2011 12:08:07 -0500 Subject: [PATCH] FS-3202 --- src/mod/say/mod_say_de/mod_say_de.c | 2 +- src/mod/say/mod_say_en/mod_say_en.c | 4 ++-- src/mod/say/mod_say_es/mod_say_es.c | 2 +- src/mod/say/mod_say_fr/mod_say_fr.c | 2 +- src/mod/say/mod_say_hr/mod_say_hr.c | 2 +- src/mod/say/mod_say_hu/mod_say_hu.c | 2 +- src/mod/say/mod_say_it/mod_say_it.c | 2 +- src/mod/say/mod_say_ja/mod_say_ja.c | 2 +- src/mod/say/mod_say_nl/mod_say_nl.c | 2 +- src/mod/say/mod_say_pt/mod_say_pt.c | 4 ++-- src/mod/say/mod_say_ru/mod_say_ru.c | 2 +- src/mod/say/mod_say_th/mod_say_th.c | 2 +- src/mod/say/mod_say_zh/mod_say_zh.c | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index ea0b380e4e..7b2c349299 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -130,7 +130,7 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, char char sbuf[13] = ""; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index 03bea87bc1..202f0d6ff2 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -126,7 +126,7 @@ static switch_status_t en_say_general_count(switch_core_session_t *session, char switch_status_t status; if (say_args->method == SSM_ITERATED) { - if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)))) { + if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) { char *p; for (p = tosay; p && *p; p++) { say_file("digits/%c.wav", *p); @@ -138,7 +138,7 @@ static switch_status_t en_say_general_count(switch_core_session_t *session, char return SWITCH_STATUS_SUCCESS; } - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_es/mod_say_es.c b/src/mod/say/mod_say_es/mod_say_es.c index ff0ee944c2..7f806f4c7c 100644 --- a/src/mod/say/mod_say_es/mod_say_es.c +++ b/src/mod/say/mod_say_es/mod_say_es.c @@ -158,7 +158,7 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, char char sbuf[13] = ""; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_fr/mod_say_fr.c b/src/mod/say/mod_say_fr/mod_say_fr.c index cf3ebabcdb..eb6f6d526c 100644 --- a/src/mod/say/mod_say_fr/mod_say_fr.c +++ b/src/mod/say/mod_say_fr/mod_say_fr.c @@ -147,7 +147,7 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, char char sbuf[13] = ""; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_hr/mod_say_hr.c b/src/mod/say/mod_say_hr/mod_say_hr.c index af2aa972c5..df124a8c74 100644 --- a/src/mod/say/mod_say_hr/mod_say_hr.c +++ b/src/mod/say/mod_say_hr/mod_say_hr.c @@ -232,7 +232,7 @@ static switch_status_t hr_say_count(switch_core_session_t *session, char* gen, strcpy(tgen, gen); - if (!(tosay = strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_hu/mod_say_hu.c b/src/mod/say/mod_say_hu/mod_say_hu.c index 6a3dfdc65e..caa26f70cf 100644 --- a/src/mod/say/mod_say_hu/mod_say_hu.c +++ b/src/mod/say/mod_say_hu/mod_say_hu.c @@ -126,7 +126,7 @@ static switch_status_t hu_say_general_count(switch_core_session_t *session, char int number; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_it/mod_say_it.c b/src/mod/say/mod_say_it/mod_say_it.c index 7a3c7bc99c..e131dde327 100644 --- a/src/mod/say/mod_say_it/mod_say_it.c +++ b/src/mod/say/mod_say_it/mod_say_it.c @@ -134,7 +134,7 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, char char sbuf[13] = ""; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_ja/mod_say_ja.c b/src/mod/say/mod_say_ja/mod_say_ja.c index 407d2d4a91..8874748462 100644 --- a/src/mod/say/mod_say_ja/mod_say_ja.c +++ b/src/mod/say/mod_say_ja/mod_say_ja.c @@ -88,7 +88,7 @@ static switch_status_t ja_say_general_count(switch_core_session_t *session, char char digits[11]; int i; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_nl/mod_say_nl.c b/src/mod/say/mod_say_nl/mod_say_nl.c index 4f4ec7edd0..3a9c89fb94 100644 --- a/src/mod/say/mod_say_nl/mod_say_nl.c +++ b/src/mod/say/mod_say_nl/mod_say_nl.c @@ -121,7 +121,7 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, char char sbuf[13] = ""; switch_status_t status; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_pt/mod_say_pt.c b/src/mod/say/mod_say_pt/mod_say_pt.c index 747a0c8984..4dd6fba81f 100644 --- a/src/mod/say/mod_say_pt/mod_say_pt.c +++ b/src/mod/say/mod_say_pt/mod_say_pt.c @@ -154,7 +154,7 @@ static switch_status_t pt_say_general_count(switch_core_session_t *session, char switch_status_t status; if (say_args->method == SSM_ITERATED) { - if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)))) { + if ((tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1))) { char *p; for (p = tosay; p && *p; p++) { say_file("digits/%c.wav", *p); @@ -166,7 +166,7 @@ static switch_status_t pt_say_general_count(switch_core_session_t *session, char return SWITCH_STATUS_SUCCESS; } - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_ru/mod_say_ru.c b/src/mod/say/mod_say_ru/mod_say_ru.c index 21e3017ef9..559075785f 100644 --- a/src/mod/say/mod_say_ru/mod_say_ru.c +++ b/src/mod/say/mod_say_ru/mod_say_ru.c @@ -164,7 +164,7 @@ static switch_status_t ru_say_count(switch_core_session_t *session, char *tosay, switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "ru_say_count %s!\n", tosay); - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_th/mod_say_th.c b/src/mod/say/mod_say_th/mod_say_th.c index 59b077a0fe..1b83363165 100644 --- a/src/mod/say/mod_say_th/mod_say_th.c +++ b/src/mod/say/mod_say_th/mod_say_th.c @@ -94,7 +94,7 @@ static switch_status_t th_say_general_count(switch_core_session_t *session, char char digits[11]; int i; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; } diff --git a/src/mod/say/mod_say_zh/mod_say_zh.c b/src/mod/say/mod_say_zh/mod_say_zh.c index e448ea6b63..24f8aa927a 100644 --- a/src/mod/say/mod_say_zh/mod_say_zh.c +++ b/src/mod/say/mod_say_zh/mod_say_zh.c @@ -93,7 +93,7 @@ static switch_status_t zh_say_general_count(switch_core_session_t *session, char char digits[11]; int i; - if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf))) || strlen(tosay) > 9) { + if (!(tosay = switch_strip_commas(tosay, sbuf, sizeof(sbuf)-1)) || strlen(tosay) > 9) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error!\n"); return SWITCH_STATUS_GENERR; }