[Skiboot] [PATCH 2/2] hdata/vpd: Remove possible dereference after null check (CID 207468)

Cyril Bur cyril.bur at au1.ibm.com
Mon Jan 15 16:18:00 AEDT 2018


The next_extry label doesn't do anything other than perform an addition
which requires a dereference of the NULL entry variable, just continue
the loop instead.

Fixes: 77190aa7 (hdata/vpd: Rework vpd node creation logic)
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
 hdata/vpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdata/vpd.c b/hdata/vpd.c
index d114e6b7..3eb7dcf2 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -400,7 +400,7 @@ void dt_init_vpd_node(void)
 		/* Get SLCA entry */
 		entry = slca_get_entry(index);
 		if (!entry)
-			goto next_entry;
+			continue;
 
 		/*
 		 * A child entry is valid if all of the following criteria is met
-- 
2.15.1



More information about the Skiboot mailing list