Make memcmp() compare the name1 and name2 value instead of comparing name1 with itself. The memcmp() is only executed if the left-hand side of the || is false i.e. when both length are equal so the length argument is correct (no out-of-bounds reads).
		
			
				
	
	
	
		
			2.7 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.7 KiB