[Skiboot] [PATCH] hdata: Make sure FW feature name is not NULL

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Sep 11 15:20:14 AEST 2018


CC: Oliver O'Halloran <oohall at gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hdata/spira.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hdata/spira.c b/hdata/spira.c
index c820c4daf..3a26f17ae 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1213,6 +1213,11 @@ static void add_iplparams_features(const struct HDIF_common_hdr *iplp)
 		name[sizeof(name)-1] = '\0';
 		flags = be64_to_cpu(feature->flags);
 
+		if (strlen(name) == 0) {
+			prlog(PR_DEBUG, "IPLPARAMS: FW feature name is NULL\n");
+			continue;
+		}
+
 		prlog(PR_DEBUG, "IPLPARAMS: FW feature %s = %016"PRIx64"\n",
 				name, flags);
 
-- 
2.14.3



More information about the Skiboot mailing list