Fix a potential segmentation fault, by not accessing the member of a null pointer to a private slot's name field.
Signed-off-by: Martin Schwan <m.sch...@phytec.de> --- boot/bootmeth_rauc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootmeth_rauc.c b/boot/bootmeth_rauc.c index 6abbd25704bdf218bb0b3a02306993584088d2c7..72075c04de1c609da21b0277acae413d97875fd0 100644 --- a/boot/bootmeth_rauc.c +++ b/boot/bootmeth_rauc.c @@ -180,7 +180,7 @@ static int distro_rauc_read_bootflow(struct udevice *dev, struct bootflow *bflow return log_msg_ret("buf", -ENOMEM); priv->slots = new_slots; priv->slots[i - 1] = s; - priv->slots[i]->name = NULL; + priv->slots[i] = NULL; } bflow->bootmeth_priv = priv; -- 2.50.0