fw_platform_init() fills platform.name without considering the
ending null character. Fix it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
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);