From f7a0a4ee01fe91b1d48fa176b9fe2b0861081c85 Mon Sep 17 00:00:00 2001 From: monsta Date: Sat, 1 Nov 2014 21:34:00 +0300 Subject: fix possible dereference of NULL pointer --- libmatekbd/matekbd-desktop-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmatekbd') diff --git a/libmatekbd/matekbd-desktop-config.c b/libmatekbd/matekbd-desktop-config.c index 7ecb376..03a98de 100644 --- a/libmatekbd/matekbd-desktop-config.c +++ b/libmatekbd/matekbd-desktop-config.c @@ -90,7 +90,7 @@ static gboolean *lld = g_strdup (""); } - if (*pv != NULL) { + if (pv != NULL && *pv != NULL) { g_snprintf (item->name, sizeof item->name, "%s", *pv); if (xkl_config_registry_find_variant @@ -115,7 +115,7 @@ static gboolean pl++; - if (*pv != NULL) + if (pv != NULL && *pv != NULL) pv++; } -- cgit v1.2.1