From: Martin Schwan Date: Mon, 14 Jul 2025 13:30:09 +0000 (+0200) Subject: bootstd: rauc: Fix segfault occurring during private struct access X-Git-Tag: v2025.10-rc1~28^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84cef694e73cc820fbc7131b1a25b79e17bec609;p=thirdparty%2Fu-boot.git 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 --- 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;