aboutsummaryrefslogtreecommitdiffstats
path: root/main/say.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:07:43 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-02 00:07:43 +0000
commit3b99bad465bea18be54fb5615bf17a9e62d4f16d (patch)
tree7f76e81e9d95b22637b2b9ca01f1349d99b61564 /main/say.c
parent7d2f53e55782a0a3086ef17f52a97a507d4351e7 (diff)
Merged revisions 221777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r221777 | tilghman | 2009-10-01 18:59:15 -0500 (Thu, 01 Oct 2009) | 9 lines Merged revisions 221776 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r221776 | tilghman | 2009-10-01 18:53:12 -0500 (Thu, 01 Oct 2009) | 2 lines Fix a bunch of off-by-one errors ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221780 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/main/say.c b/main/say.c
index c70e91418..f284f4a83 100644
--- a/main/say.c
+++ b/main/say.c
@@ -3496,7 +3496,7 @@ int ast_say_date_with_format_en(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -3743,7 +3743,7 @@ int ast_say_date_with_format_da(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -3945,7 +3945,7 @@ int ast_say_date_with_format_de(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -4148,7 +4148,7 @@ int ast_say_date_with_format_th(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -4342,7 +4342,7 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -4482,7 +4482,7 @@ int ast_say_date_with_format_es(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
snprintf(nextmsg, sizeof(nextmsg), "%s", sndfile);
@@ -4671,7 +4671,7 @@ int ast_say_date_with_format_fr(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -4866,7 +4866,7 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -5096,7 +5096,7 @@ int ast_say_date_with_format_nl(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -5299,7 +5299,7 @@ int ast_say_date_with_format_pl(struct ast_channel *chan, time_t thetime, const
case '\'':
/* Literal name of a sound file */
sndoffset = 0;
- for (sndoffset = 0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset = 0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -5518,7 +5518,7 @@ int ast_say_date_with_format_pt(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
snprintf(nextmsg, sizeof(nextmsg), "%s", sndfile);
@@ -5810,7 +5810,7 @@ int ast_say_date_with_format_zh(struct ast_channel *chan, time_t t, const char *
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);
@@ -7299,7 +7299,7 @@ static int ast_say_date_with_format_gr(struct ast_channel *chan, time_t t, const
case '\'':
/* Literal name of a sound file */
sndoffset=0;
- for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < 256) ; sndoffset++)
+ for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
sndfile[sndoffset] = format[offset];
sndfile[sndoffset] = '\0';
res = wait_file(chan, ints, sndfile, lang);