aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/say.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/say.c b/main/say.c
index 5e3ae96d9..7f7927308 100644
--- a/main/say.c
+++ b/main/say.c
@@ -4212,7 +4212,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);