aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorXiang W <wxjstz@126.com>2023-10-31 00:39:40 +0800
committerAnup Patel <anup@brainfault.org>2023-11-17 13:23:49 +0530
commit6602e11de375b761d778808cc38645fce314c4fa (patch)
tree534c8de289a207d5a58fa5ee6d1bd6abf4990d5b /platform
parent6e5b0cfb4520d0c2d36ae1005770f2537970e90a (diff)
downloadopensbi-6602e11de375b761d778808cc38645fce314c4fa.zip
opensbi-6602e11de375b761d778808cc38645fce314c4fa.tar.gz
opensbi-6602e11de375b761d778808cc38645fce314c4fa.tar.bz2
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: 6259b2ec2d09 ("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>
Diffstat (limited to 'platform')
-rw-r--r--platform/generic/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/generic/platform.c b/platform/generic/platform.c
index 4246efd..85acecd 100644
--- a/platform/generic/platform.c
+++ b/platform/generic/platform.c
@@ -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;