diff options
-rw-r--r-- | src/sss_client/pam_sss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c index a7eb60309..45e318109 100644 --- a/src/sss_client/pam_sss.c +++ b/src/sss_client/pam_sss.c @@ -972,6 +972,10 @@ static int eval_response(pam_handle_t *pamh, size_t buflen, uint8_t *buf, free(pi->selinux_user); } pi->selinux_user = (char *)malloc(len + 1); + if (!pi->selinux_user) { + D(("Insufficient memory.")); + return PAM_SYSTEM_ERR; + } memcpy(pi->selinux_user, &buf[p], len + 1); break; default: |