summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pam_radius_auth.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c
index 5a60fa0..e9b3034 100644
--- a/src/pam_radius_auth.c
+++ b/src/pam_radius_auth.c
@@ -619,17 +619,22 @@ static int initialize(radius_conf_t *conf, int accounting)
p = buffer;
/*
- * Skip blank lines and whitespace
+ * Skip whitespace
*/
- while (*p && ((*p == ' ') || (*p == '\t') || (*p == '\r') || (*p == '\n'))) {
- p++;
- }
+ while ((*p == ' ') || (*p == '\t')) p++;
/*
- * Nothing, or just a comment. Ignore the line.
+ * Skip blank lines and comments.
*/
- if ((!*p) || (*p == '#')) {
- continue;
+ if ((*p == '\r') || (*p == '\n') || (*p == '#')) continue;
+
+ /*
+ * Error out if the text is too long.
+ */
+ if (!*p) {
+ _pam_log(LOG_ERR, "ERROR reading %s, line %d: Line too long\n",
+ conf_file, line);
+ break;
}
timeout = 3;