1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-21 15:54:41 +01:00

pam_sm_authenticate: check strdup return value

This commit is contained in:
Fredrik Thulin 2011-11-22 11:08:53 +01:00
parent 57cf6ed5d6
commit 47d883b600

View File

@ -791,6 +791,11 @@ pam_sm_authenticate (pam_handle_t * pamh,
{
char *onlypasswd = strdup (password);
if (! onlypasswd) {
retval = PAM_BUF_ERR;
goto done;
}
onlypasswd[password_len - (TOKEN_OTP_LEN + cfg->token_id_length)] = '\0';
DBG (("Extracted a probable system password entered before the OTP - "