mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	config.c: #include of non-existent file should not crash
Corrects a segmentation fault when a configuration file has a #include statement that referenced a file that does not exist. Resolves: https://github.com/asterisk/asterisk/issues/1139
This commit is contained in:
		
				
					committed by
					
						![github-actions[bot]](/avatar/af2ab225b7c0eec44a8d0eba6b5c869a?size=40) github-actions[bot]
						github-actions[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							1e469a5e06
						
					
				
				
					commit
					9277311f93
				
			| @@ -2246,7 +2246,6 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, | ||||
| 		} | ||||
| 		if (!result && (include_type != CONFIG_STATEMENT_TRYINCLUDE)) { | ||||
| 			ast_log(LOG_ERROR, "The file '%s' was listed as a #include but it does not exist.\n", cur); | ||||
| 			ast_include_destroy(newinclude); | ||||
| 			return -1; | ||||
| 		} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user