devmand: properly prevent overflow
closes #22 Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0
This commit is contained in:
		
							parent
							
								
									1cd28eb8e4
								
							
						
					
					
						commit
						3a1943c1c1
					
				@ -544,7 +544,7 @@ static enum dev_type determine_type (char *path)
 | 
			
		||||
		return DEV_TYPE_UNKOWN;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	res = fscanf(fd , "%256s\n", buf);
 | 
			
		||||
	res = fscanf(fd , "%255s\n", buf);
 | 
			
		||||
	fclose(fd);
 | 
			
		||||
 | 
			
		||||
	if (res != 1) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user