diff options
| author | Bin Meng <[email protected]> | 2021-07-04 23:01:13 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2021-07-06 14:21:53 +0530 |
| commit | 17e23b678dac2e4579e714705cec137b351f7e9b (patch) | |
| tree | bb8c9a38cdab616127201eca429af82f697788a5 | |
| parent | 197e08941bd394b6b88ad07c5a3adfe67f5b3b10 (diff) | |
platform: generic: Terminate platform.name with null
fw_platform_init() fills platform.name without considering the
ending null character. Fix it.
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | platform/generic/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/generic/platform.c b/platform/generic/platform.c index da0c1af8..79d52300 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -85,7 +85,7 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1, model = fdt_getprop(fdt, root_offset, "model", &len); if (model) - sbi_strncpy(platform.name, model, sizeof(platform.name)); + sbi_strncpy(platform.name, model, sizeof(platform.name) - 1); if (generic_plat && generic_plat->features) platform.features = generic_plat->features(generic_plat_match); |
