diff options
author | Martin Schwan <m.schwan@phytec.de> | 2025-07-14 15:30:09 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-22 13:53:17 -0600 |
commit | 84cef694e73cc820fbc7131b1a25b79e17bec609 (patch) | |
tree | 4fbaeb097607c14808b4e8fcc1e9d916ac8d3ec3 | |
parent | a7d1214d2c9a38af3a9a1271dd8388068cba904c (diff) |
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>
-rw-r--r-- | boot/bootmeth_rauc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/bootmeth_rauc.c b/boot/bootmeth_rauc.c index 6abbd25704b..72075c04de1 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; |