From: Charles Rose Date: Mon, 22 Oct 2018 09:48:02 +0200 Subject: dmidecode: Fix Redfish Hostname print length Git-commit: fde47bb227b8fa817c88d7e10a8eb771c46de1df Patch-mainline: yes References: bsc#1112755 Redfish Hostname prints beyond hlen characters. Fix it. Signed-off-by: Charles Rose Fixes: 78539b06117c ("dmidecode: Parse Modern Management Controller blocks") Acked-by: Neil Horman Signed-off-by: Jean Delvare --- dmidecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/dmidecode.c +++ b/dmidecode.c @@ -3609,7 +3609,7 @@ static void dmi_parse_protocol_record(co hname = out_of_spec; hlen = strlen(out_of_spec); } - printf("%s\t\tRedfish Service Hostname: %*s\n", prefix, hlen, hname); + printf("%s\t\tRedfish Service Hostname: %.*s\n", prefix, hlen, hname); } /*