mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
tests: Fix segfault in verify when used without -f
We tried to use strcmp on a NULL string. https://bugs.freedesktop.org/show_bug.cgi?id=85736
This commit is contained in:
committed by
Bastien Nocera
parent
f94c8727d2
commit
f7c51b0d58
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
static DBusGProxy *manager = NULL;
|
static DBusGProxy *manager = NULL;
|
||||||
static DBusGConnection *connection = NULL;
|
static DBusGConnection *connection = NULL;
|
||||||
static char *finger_name = "any";
|
static char *finger_name = NULL;
|
||||||
static gboolean g_fatal_warnings = FALSE;
|
static gboolean g_fatal_warnings = FALSE;
|
||||||
static char **usernames = NULL;
|
static char **usernames = NULL;
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ static void find_finger(DBusGProxy *dev, const char *username)
|
|||||||
g_print(" - #%d: %s\n", i, fingers[i]);
|
g_print(" - #%d: %s\n", i, fingers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (finger_name, "any") == 0) {
|
if (finger_name == NULL || strcmp (finger_name, "any") == 0) {
|
||||||
g_free (finger_name);
|
g_free (finger_name);
|
||||||
finger_name = g_strdup (fingers[0]);
|
finger_name = g_strdup (fingers[0]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user