Files
flatpak/common
Matthew Leeds 35a4efcb0b 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

(cherry picked from commit 6b4402b60e)
2018-10-12 10:07:32 +02: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-09-03 11:54:19 -04:00
2018-09-03 11:54:19 -04: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-12 10:07:32 +02:00
2018-07-08 10:05:37 +00:00
2018-10-12 10:07:32 +02:00
2018-05-24 11:59:52 +00:00
2018-09-03 11:54:19 -04:00
2018-07-08 10:05:37 +00:00