[Skiboot] [PATCH 2/2] hdata/vpd: Remove possible dereference after null check (CID 207468)
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Wed Jan 17 16:01:41 AEDT 2018
On 01/15/2018 10:48 AM, Cyril Bur wrote:
> 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>
Looks good.
Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
-Vasant
> ---
> 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
>
More information about the Skiboot
mailing list