diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-30 17:58:16 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-30 17:58:16 +0000 |
commit | 9d37c0ef15ff55f58882606f697d961d75ea5ed3 (patch) | |
tree | ce5991ccd750c351ac6bb92bf2e01ec06feb47f4 /res/res_musiconhold.c | |
parent | 23da0e56140a5909f888695f227b92e8765d30b4 (diff) |
Merged revisions 16534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r16534 | file | 2006-03-30 13:55:28 -0400 (Thu, 30 Mar 2006) | 2 lines
Do not exceed the array size for maximum allowed moh files. (issue #6842)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16535 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 289d139d0..4c0f93213 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -776,6 +776,11 @@ static int moh_scan_files(struct mohclass *class) { if (i == class->total_files) strcpy(class->filearray[class->total_files++], filepath); + + /* If the new total files is equal to the maximum allowed, stop adding new ones */ + if (class->total_files == MAX_MOHFILES) + break; + } closedir(files_DIR); |