mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	Do not exceed the array size for maximum allowed moh files. (issue #6842)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -778,6 +778,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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user