From ff93f89eb5609539a891e4c1bd2d167fe18f52d7 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Thu, 26 Apr 2018 15:58:13 -0700 Subject: [PATCH] lib: Don't try to read uninitialized memory Oddly this uninitialized memory read leads to a seg fault on ARM but not on x86_64. Closes: #1621 Approved by: mwleeds --- lib/flatpak-remote-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flatpak-remote-ref.c b/lib/flatpak-remote-ref.c index fca7377a..0a4c1e4d 100644 --- a/lib/flatpak-remote-ref.c +++ b/lib/flatpak-remote-ref.c @@ -326,7 +326,7 @@ flatpak_remote_ref_new (FlatpakCollectionRef *coll_ref, { FlatpakRefKind kind = FLATPAK_REF_KIND_APP; guint64 download_size = 0, installed_size = 0; - const char *metadata; + const char *metadata = NULL; g_autoptr(GBytes) metadata_bytes = NULL; g_auto(GStrv) parts = NULL; FlatpakRemoteRef *ref;