summaryrefslogtreecommitdiff
path: root/main/say.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-10-01 23:59:15 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-10-01 23:59:15 +0000
commit8c7b3cf7384bb128cd9b7b46fb0f19f86df6e96a (patch)
tree59ec8a2ea451162a82d2762fb12a5bc12e9812d3 /main/say.c
parentdd0c76a9d3248f670c62100e4f3423a762dc72f5 (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@221777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/main/say.c b/main/say.c
index f43f188c5..5e3ae96d9 100644
--- a/main/say.c
+++ b/main/say.c
@@ -3560,7 +3560,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);
@@ -3807,7 +3807,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);
@@ -4009,7 +4009,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);
@@ -4406,7 +4406,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);
@@ -4546,7 +4546,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);
@@ -4735,7 +4735,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);
@@ -4930,7 +4930,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);
@@ -5160,7 +5160,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);
@@ -5363,7 +5363,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);
@@ -5582,7 +5582,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);
@@ -5874,7 +5874,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);
@@ -7363,7 +7363,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);