mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_pjsip_nat: Fix potential use of uninitialized transport details
The ast_sip_request_transport_details must be zero initialized, otherwise this could lead to a SEGV. Resolves: #509
This commit is contained in:
		
				
					committed by
					
						![asterisk-org-access-app[bot]](/avatar/58a64b62d62d5b23df7bc832f016f9db?size=40) asterisk-org-access-app[bot]
						asterisk-org-access-app[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							58b16a538d
						
					
				
				
					commit
					14bd1ceef6
				
			| @@ -605,7 +605,7 @@ struct ast_sip_transport_state *ast_sip_find_transport_state_in_use(struct ast_s | ||||
| int ast_sip_rewrite_uri_to_local(pjsip_sip_uri *uri, pjsip_tx_data *tdata) { | ||||
| 	RAII_VAR(struct ast_sip_transport *, transport, NULL, ao2_cleanup); | ||||
| 	RAII_VAR(struct ast_sip_transport_state *, transport_state, NULL, ao2_cleanup); | ||||
| 	struct ast_sip_request_transport_details details; | ||||
| 	struct ast_sip_request_transport_details details = { 0, }; | ||||
| 	pjsip_sip_uri *tmp_uri; | ||||
| 	pjsip_dialog *dlg; | ||||
| 	struct ast_sockaddr addr = { { 0, } }; | ||||
|   | ||||
| @@ -319,8 +319,8 @@ static pj_status_t process_nat(pjsip_tx_data *tdata) | ||||
| { | ||||
| 	RAII_VAR(struct ast_sip_transport *, transport, NULL, ao2_cleanup); | ||||
| 	RAII_VAR(struct ast_sip_transport_state *, transport_state, NULL, ao2_cleanup); | ||||
| 	struct ast_sip_request_transport_details details = { 0, }; | ||||
| 	pjsip_via_hdr *via = NULL; | ||||
| 	struct ast_sip_request_transport_details details; | ||||
| 	struct ast_sockaddr addr = { { 0, } }; | ||||
| 	pjsip_sip_uri *uri = NULL; | ||||
| 	RAII_VAR(struct ao2_container *, hooks, NULL, ao2_cleanup); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user