From 59897f2b8484e322a77f23cc0d532dbd3de6aac6 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 3 May 2017 11:31:58 -0500 Subject: [PATCH] pull: Fix crash specifying override URL in summary fetch The summary URL override is looked up with "&s", which directly exchanges the data to a pointer without allocation. This was causing a segfault calling ostree_repo_remote_fetch_summary_with_options from pygobject. Closes: #829 Approved by: jlebon --- src/libostree/ostree-repo-pull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 2cfa2e86..35598eca 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -2459,7 +2459,7 @@ repo_remote_fetch_summary (OstreeRepo *self, g_autoptr(GMainContext) mainctx = NULL; gboolean ret = FALSE; gboolean from_cache = FALSE; - g_autofree char *url_override = NULL; + const char *url_override = NULL; g_autoptr(GPtrArray) mirrorlist = NULL; if (options)