forked from Mirrors/opensbi
		
	lib: sbi: change sbi_hart_features.extensions as an array
In the future there may be a lot of ISA extensions, a 'long' may not
be able to accommodate, changed to an array for the future.
Addresses-Coverity-ID: 1568357 Out-of-bounds access
Fixes: 6259b2ec2d ("lib: utils/fdt: Fix fdt_parse_isa_extensions()
implementation")
Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
			
			
This commit is contained in:
		@@ -215,7 +215,7 @@ static int generic_extensions_init(struct sbi_hart_features *hfeatures)
 | 
			
		||||
 | 
			
		||||
	/* Parse the ISA string from FDT and enable the listed extensions */
 | 
			
		||||
	rc = fdt_parse_isa_extensions(fdt_get_address(), current_hartid(),
 | 
			
		||||
				      &hfeatures->extensions);
 | 
			
		||||
				      hfeatures->extensions);
 | 
			
		||||
 | 
			
		||||
	if (rc)
 | 
			
		||||
		return rc;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user