hostname() null terminaiton subtraction *is* needed
This commit is contained in:
		
				
					committed by
					
						
						Aaron Marcher (drkhsh)
					
				
			
			
				
	
			
			
			
						parent
						
							bca9b5246a
						
					
				
				
					commit
					1ad9f2504d
				
			@@ -273,7 +273,7 @@ hostname(void)
 | 
			
		||||
 | 
			
		||||
	fgets(hostname, sizeof(hostname), fp);
 | 
			
		||||
	/* FIXME: needs improvement */
 | 
			
		||||
	memset(&hostname[strlen(hostname)], '\0',
 | 
			
		||||
	memset(&hostname[strlen(hostname)-1], '\0',
 | 
			
		||||
		sizeof(hostname) - strlen(hostname));
 | 
			
		||||
	fclose(fp);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user