mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	format_cap.c: Fix CLI "core show channeltype Surrogate" crash.
* Make ast_format_cap_get_names() NULL tolerant. ASTERISK-26331 #close Reported by: CGI.NET Change-Id: Id67e93936dc8ec2a33a9d33655843d43b59285a3
This commit is contained in:
		| @@ -703,7 +703,7 @@ const char *ast_format_cap_get_names(struct ast_format_cap *cap, struct ast_str | ||||
|  | ||||
| 	ast_str_set(buf, 0, "("); | ||||
|  | ||||
| 	if (!AST_VECTOR_SIZE(&cap->preference_order)) { | ||||
| 	if (!cap || !AST_VECTOR_SIZE(&cap->preference_order)) { | ||||
| 		ast_str_append(buf, 0, "nothing)"); | ||||
| 		return ast_str_buffer(*buf); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user