From a75f7df7c24e39c5cbf929273676d96d8af82bc5 Mon Sep 17 00:00:00 2001 From: Steve Bedford Date: Mon, 18 Sep 2017 15:48:18 -0400 Subject: [PATCH] Check if the package is in the mapping hash before trying to update it Otherwise, the lookup returns NULL but is still passed to g_strsplit(). --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 05548ff..8a46e60 100644 --- a/src/main.c +++ b/src/main.c @@ -102,7 +102,7 @@ static void cve_add_package_internal(struct source_package_t *pkg) return; } - if (self->mapping) { + if (self->mapping && g_hash_table_contains(self->mapping, pkg->name)) { q = g_hash_table_lookup(self->mapping, pkg->name); /*