hwtracing: coresight: Fix potentioal buffer overflow
Change-Id: I7aaba80fbbf85d355c9383a9be1f423bd91c3aa6
This commit is contained in:
		@@ -423,7 +423,7 @@ static ssize_t out_mode_store(struct device *dev,
 | 
			
		||||
 | 
			
		||||
	if (strlen(buf) >= 10)
 | 
			
		||||
		return -EINVAL;
 | 
			
		||||
	if (sscanf(buf, "%10s", str) != 1)
 | 
			
		||||
	if (sscanf(buf, "%9s", str) != 1)
 | 
			
		||||
		return -EINVAL;
 | 
			
		||||
 | 
			
		||||
	ret = tmc_etr_switch_mode(drvdata, str);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user