mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	Fix out of bounds memory access
cppcheck reported: [tools/intel_infoframes.c:836]: (error) Width 31 given in format string (no. 1) is larger than destination buffer 'option[16]', use %15s to prevent overflowing it. Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
		
							parent
							
								
									05bfbf4227
								
							
						
					
					
						commit
						cda8bee056
					
				@ -833,7 +833,7 @@ static void change_spd_infoframe(Transcoder transcoder, char *commands)
 | 
			
		||||
	val = INREG(reg);
 | 
			
		||||
 | 
			
		||||
	while (1) {
 | 
			
		||||
		rc = sscanf(current, "%31s%n", option, &read);
 | 
			
		||||
		rc = sscanf(current, "%15s%n", option, &read);
 | 
			
		||||
		current = ¤t[read];
 | 
			
		||||
		if (rc == EOF) {
 | 
			
		||||
			break;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user