summaryrefslogtreecommitdiff
path: root/pam
diff options
context:
space:
mode:
Diffstat (limited to 'pam')
-rw-r--r--pam/gkr-pam-module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c
index 7200d255..b81f1483 100644
--- a/pam/gkr-pam-module.c
+++ b/pam/gkr-pam-module.c
@@ -137,6 +137,9 @@ foreach_line (char *lines, line_cb cb, void *arg)
static char*
read_all (int fd)
{
+ /* We only accept a max of 8K from the daemon */
+ #define MAX_LENGTH 8192
+
char buf[256];
char *ret = NULL;
int r, len = 0;
@@ -163,7 +166,7 @@ read_all (int fd)
strncat (ret, buf, r);
}
- if (r == 0)
+ if (r == 0 || len > MAX_LENGTH)
break;
}