File dmidecode-fix-redfish-hostname-print-length.patch of Package dmidecode

From: Charles Rose <Charles.Rose@dell.com>
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 <charles.rose@dell.com>
Fixes: 78539b06117c ("dmidecode: Parse Modern Management Controller blocks")
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 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);
 }
 
 /*