mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-29 18:11:22 -05:00
oci: Fix potential crash
Call flatpak_remote_state_ensure_summary() before dereferencing RemoteState->summary to return an error instead of crashing if downloading the summary failed.
This commit is contained in:
committed by
Alexander Larsson
parent
47daa077c2
commit
fd197300b9
@@ -716,6 +716,9 @@ flatpak_remote_state_new_oci_registry (FlatpakRemoteState *self,
|
||||
g_autofree char *registry_uri = NULL;
|
||||
g_autoptr(FlatpakOciRegistry) registry = NULL;
|
||||
|
||||
if (!flatpak_remote_state_ensure_summary (self, error))
|
||||
return NULL;
|
||||
|
||||
registry_uri = lookup_oci_registry_uri_from_summary (self->summary, error);
|
||||
if (registry_uri == NULL)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user