Fix crash due to negative max copy length.
This commit is contained in:
		
							parent
							
								
									f71bc59527
								
							
						
					
					
						commit
						1da917e5b9
					
				| @ -390,7 +390,7 @@ static int check_user_agent(struct hub_info* hub, struct hub_user* user, struct | ||||
| 		str = adc_msg_unescape(ua_version_encoded); | ||||
| 		if (str) | ||||
| 		{ | ||||
| 			memcpy(user->id.user_agent + offset, str, MIN(strlen(str), MAX_UA_LEN) - offset); | ||||
| 			memcpy(user->id.user_agent + offset, str, MIN(strlen(str), MAX_UA_LEN - offset)); | ||||
| 			hub_free(str); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user