mirror of
				https://github.com/clearml/dropbear
				synced 2025-06-26 18:17:32 +00:00 
			
		
		
		
	initialize variable and protect against NULL dereferencement
This commit is contained in:
		
							parent
							
								
									2e38ac7504
								
							
						
					
					
						commit
						0d9c3fe70b
					
				| @ -234,7 +234,7 @@ static int newtcpforwarded(struct Channel * channel) { | ||||
| 	char *origaddr = NULL; | ||||
| 	unsigned int origport; | ||||
| 	m_list_elem * iter = NULL; | ||||
| 	struct TCPFwdEntry *fwd; | ||||
| 	struct TCPFwdEntry *fwd = NULL; | ||||
| 	char portstring[NI_MAXSERV]; | ||||
| 	int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; | ||||
| 
 | ||||
| @ -265,7 +265,7 @@ static int newtcpforwarded(struct Channel * channel) { | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 	if (iter == NULL) { | ||||
| 	if (iter == NULL || fwd == NULL) { | ||||
| 		/* We didn't request forwarding on that port */ | ||||
| 		cleantext(origaddr); | ||||
| 		dropbear_log(LOG_INFO, "Server sent unrequested forward from \"%s:%d\"",  | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user