Files
flatpak/common
Matthew Leeds 6b4402b60e common: Don't seg fault if a ref doesn't exist
Currently, if flatpak_installed_ref_get_latest_commit() returns NULL
(which means the ref doesn't exist in the local repo) we assume any
remote commit could be an update in
flatpak_installation_list_installed_refs_for_update() when a collection
ID is not configured on the remote. When a collection ID is configured,
if get_latest_commit() returns NULL it causes a crash in
ostree_repo_load_commit(). So this commit prevents the crash and makes
the behavior in the post-collection-id world consistent with the
behavior in the pre-collection-id world.

It's difficult to write a test for this that's not contrived, without
knowing what circumstances led to the disappearance of the ref from the
repo.

Fixes https://github.com/flatpak/flatpak/issues/2216

Closes: #2229
Approved by: alexlarsson
2018-10-10 13:54:23 +00:00
..
2018-05-24 11:59:52 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-10-02 06:21:49 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:22:27 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-09-27 07:29:18 +00:00
2018-05-24 11:59:52 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-05-24 11:59:52 +00:00
2018-10-08 08:11:09 +00:00
2018-07-08 10:05:37 +00:00
2018-10-10 12:20:27 +02:00
2018-10-10 12:20:27 +02:00
2018-05-24 11:59:52 +00:00
2018-10-08 08:36:23 +00:00
2018-07-08 10:05:37 +00:00