From ca2dda06bb74bc34d39461b656eba71a7140c4d0 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Mon, 14 May 2012 15:29:30 +0200 Subject: [PATCH] Avoid pam module segfault on login without devices Testing the paths_array GPtrArray against NULL fails for an unknown reason, where testing that it's length is zero doesn't. Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=49904 --- pam/pam_fprintd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c index 6dee6ae..0e9b227 100644 --- a/pam/pam_fprintd.c +++ b/pam/pam_fprintd.c @@ -182,7 +182,7 @@ static DBusGProxy *open_device(pam_handle_t *pamh, DBusGConnection *connection, return NULL; } - if (paths_array == NULL) { + if (paths_array->len == 0) { D(pamh, "No devices found\n"); return NULL; } -- 1.7.2.5