From 349d7958f35fc04642a5be224ca36e6c6bc5b8ed Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 14 Aug 2013 10:20:41 +0200 Subject: [PATCH] Fix use of uninitialized memory in ostree_builtin_checksum() https://bugzilla.gnome.org/show_bug.cgi?id=705968 --- src/ostree/ot-builtin-checksum.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ostree/ot-builtin-checksum.c b/src/ostree/ot-builtin-checksum.c index aa82a977..999bdd25 100644 --- a/src/ostree/ot-builtin-checksum.c +++ b/src/ostree/ot-builtin-checksum.c @@ -26,6 +26,8 @@ #include "ostree.h" #include "libgsystem.h" +#include + static GOptionEntry options[] = { { NULL } }; @@ -61,6 +63,8 @@ ostree_builtin_checksum (int argc, char **argv, GFile *repo_path_path, GCancella gs_unref_object GFile *f = NULL; AsyncChecksumData data; + memset (&data, 0, sizeof (data)); + context = g_option_context_new ("FILENAME - Checksum a file or directory"); g_option_context_add_main_entries (context, options, NULL);