From 80f1b344426817803e9864a446d666540adba661 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 20 Sep 2018 16:38:19 +0900 Subject: [PATCH] sd-hwdb: initialize variable The variable 'fn' was not initialized on compat mode. Fixes CID#1395731. --- src/libsystemd/sd-hwdb/hwdb-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c index fe1f93b..bfb3ae0 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c @@ -133,7 +133,7 @@ static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_v static int trie_node_add_value(struct trie *trie, struct trie_node *node, const char *key, const char *value, const char *filename, uint16_t file_priority, uint32_t line_number, bool compat) { - ssize_t k, v, fn; + ssize_t k, v, fn = 0; struct trie_value_entry *val; k = strbuf_add_string(trie->strings, key, strlen(key)); -- 2.7.4