bootstd: rauc: Fix segfault occurring during private struct access

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.schwan@phytec.de>
This commit is contained in:
Martin Schwan
2025-07-22 13:53:17 -06:00
committed by Tom Rini
parent a7d1214d2c
commit 84cef694e7
+1 -1
View File
@@ -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;