summaryrefslogtreecommitdiffstats
path: root/contrib/openpam/lib/pam_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/openpam/lib/pam_start.c')
-rw-r--r--contrib/openpam/lib/pam_start.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/openpam/lib/pam_start.c b/contrib/openpam/lib/pam_start.c
index ff9cc32..a059661 100644
--- a/contrib/openpam/lib/pam_start.c
+++ b/contrib/openpam/lib/pam_start.c
@@ -132,7 +132,7 @@ _pam_read_policy_file(pam_handle_t *pamh,
/* strip comments and trailing whitespace */
if ((p = strchr(buf, '#')) != NULL)
len = p - buf ? p - buf - 1 : p - buf;
- while (len > 0 && isspace(buf[len]))
+ while (len > 0 && isspace(buf[len - 1]))
--len;
if (len == 0)
continue;
OpenPOWER on IntegriCloud