mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Audit improper usage of scheduler exposed by 5c713fdf18.
				
					
				
			channels/chan_iax2.c: * Initialize struct chan_iax2_pvt scheduler ids earlier because of iax2_destroy_helper(). channels/chan_sip.c: channels/sip/config_parser.c: * Fix initialization of scheduler id struct members. Some off nominal paths had 0 as a scheduler id to be destroyed when it was never started. chan_skinny.c: * Fix some scheduler id comparisons that excluded the valid 0 id. channel.c: * Fix channel initialization of the video stream scheduler id. pbx_dundi.c: * Fix channel initialization of the packet retransmission scheduler id. ASTERISK-25476 Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8
This commit is contained in:
		| @@ -79,13 +79,17 @@ int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const | ||||
| 		AST_APP_ARG(port); | ||||
| 	); | ||||
|  | ||||
| 	if (!reg) { | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	reg->expire = -1; | ||||
| 	reg->timeout = -1; | ||||
|  | ||||
| 	if (!value) { | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	if (!reg) { | ||||
| 		return -1; | ||||
| 	} | ||||
| 	ast_copy_string(buf, value, sizeof(buf)); | ||||
|  | ||||
| 	/*! register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry] | ||||
| @@ -261,7 +265,6 @@ int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const | ||||
| 	ast_string_field_set(reg, regdomain, ast_strip_quoted(S_OR(user2.domain, ""), "\"", "\"")); | ||||
|  | ||||
| 	reg->transport = transport; | ||||
| 	reg->timeout = reg->expire = -1; | ||||
| 	reg->portno = portnum; | ||||
| 	reg->regdomainport = domainport; | ||||
| 	reg->callid_valid = FALSE; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user