One more off-by-one in trunk
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 2 Oct 2009 00:08:21 +0000 (00:08 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 2 Oct 2009 00:08:21 +0000 (00:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221781 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/say.c

index 5e3ae96..7f79273 100644 (file)
@@ -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);