pam_fprintd: Guard against NULL pointer returned by finger_str_to_msg

Otherwise the PAM module will crash trying to send an info message about
the selected print.
This commit is contained in:
Benjamin Berg 2020-12-05 11:36:41 +01:00
parent bf2236620e
commit 043fcaafec

View file

@ -249,6 +249,10 @@ verify_finger_selected (sd_bus_message *m,
}
msg = finger_str_to_msg(finger_name, data->driver, data->is_swipe);
if (!msg) {
data->result = strdup ("Protocol error with fprintd!");
return 0;
}
if (debug)
pam_syslog (data->pamh, LOG_DEBUG, "verify_finger_selected %s", msg);
send_info_msg (data->pamh, msg);