Fix crash on image indexes with missing architecture

It's legitimate to have manifests listed in an image index that
have no platform object, and hence no architecture - avoid crashing
if we encounter such a manifest.
This commit is contained in:
Owen W. Taylor
2026-06-16 15:55:18 -04:00
committed by Sebastian Wick
parent fa4b413c02
commit b15828e119

View File

@@ -595,7 +595,7 @@ flatpak_oci_index_get_manifest_for_arch (FlatpakOciIndex *self,
for (i = 0; self->manifests[i] != NULL; i++)
{
if (strcmp (self->manifests[i]->platform.architecture, oci_arch) == 0)
if (g_strcmp0 (self->manifests[i]->platform.architecture, oci_arch) == 0)
return self->manifests[i];
}