aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/pam_echo/pam_echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_echo/pam_echo.c b/modules/pam_echo/pam_echo.c
index d05597a2..6a7c2f64 100644
--- a/modules/pam_echo/pam_echo.c
+++ b/modules/pam_echo/pam_echo.c
@@ -183,7 +183,7 @@ pam_echo (pam_handle_t *pamh, int flags, int argc, const char **argv)
return PAM_IGNORE;
}
- if ((uintmax_t) st.st_size >= (uintmax_t) SIZE_MAX)
+ if ((uintmax_t) st.st_size > (uintmax_t) INT_MAX)
{
close (fd);
return PAM_BUF_ERR;
@@ -196,7 +196,7 @@ pam_echo (pam_handle_t *pamh, int flags, int argc, const char **argv)
return PAM_BUF_ERR;
}
- if (pam_modutil_read (fd, mtmp, st.st_size) == -1)
+ if (pam_modutil_read (fd, mtmp, st.st_size) != st.st_size)
{
pam_syslog (pamh, LOG_ERR, "Error while reading %s: %m", file);
free (mtmp);