From: Sean Anderson Date: Sat, 4 Nov 2023 20:37:39 +0000 (-0400) Subject: spl: nand: Fix NULL-pointer dereference X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=23fe0c0747a376e39ce54485735a5df3b322f90b;p=u-boot.git spl: nand: Fix NULL-pointer dereference spl_nand_fit_read unconditionally accesses load->priv. Ensure it is set. Fixes: 00e180cc513 ("spl: nand: support loading i.MX container format file") Signed-off-by: Sean Anderson --- diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 07916bedbb..5b6932bf7e 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -105,7 +105,7 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, struct spl_load_info load; load.dev = NULL; - load.priv = NULL; + load.priv = &offset; load.filename = NULL; load.bl_len = bl_len; load.read = spl_nand_fit_read;