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:
parent
57cf6ed5d6
commit
47d883b600
@ -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 - "
|
||||
|
Loading…
x
Reference in New Issue
Block a user