From f4eaacd0ec5efc0d21fad2fb6e2e687e0a8ab8dd Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Fri, 4 Dec 2020 18:22:04 +0100 Subject: [PATCH] pam: Return a fixed string about protocol error if there is no message This can only happen if fprintd is not adhering to the protocol. --- pam/pam_fprintd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c index 8449875..eb43c34 100644 --- a/pam/pam_fprintd.c +++ b/pam/pam_fprintd.c @@ -202,6 +202,10 @@ verify_result (sd_bus_message *m, } msg = verify_result_str_to_msg (result, data->is_swipe); + if (!msg) { + data->result = strdup ("Protocol error with fprintd!"); + return 0; + } send_err_msg (data->pamh, msg); return 0;