Fix a segmentation fault caused by a null pointer access during root
partition checking. The function part_get_info() was falsely given null
for the disk_partition struct, which later resulted in accessing a null
pointer and thus undefined behavior.
Fixes: 5d7c080ae5dc ("bootstd: rauc: Don't check root part filesystem")
Signed-off-by: Martin Schwan <m.schwan@phytec.de>
{
struct blk_desc *desc;
struct distro_rauc_priv *priv;
+ struct disk_partition fs_info;
char *boot_order;
const char **boot_order_list;
bool slot_found = false;
if (ret)
continue;
fs_close();
- ret = part_get_info(desc, slot->root_part, NULL);
+ ret = part_get_info(desc, slot->root_part, &fs_info);
if (ret)
continue;
slot_found = true;