From e4e14109ade6398ecae5ae882635410b606b2649 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 14 Apr 2015 11:01:19 +0200 Subject: sshfs: Increase the maximum length of the password read from stdin to 1024 characters. Reported by: Mario A. Valdez-Ramirez. --- ChangeLog | 5 +++++ sshfs.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0a15d54..0d070d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-14 Miklos Szeredi + + * sshfs: Increase the maximum length of the password read from + stdin to 1024 characters. Reported by: Mario A. Valdez-Ramirez. + 2014-02-10 Miklos Szeredi * sshfs: return the correct X_OK access. Reported by: Alkis diff --git a/sshfs.c b/sshfs.c index 5768ec2..3904a50 100644 --- a/sshfs.c +++ b/sshfs.c @@ -125,6 +125,8 @@ #define READDIR_START 2 #define READDIR_MAX 32 +#define MAX_PASSWORD 1024 + struct buffer { uint8_t *p; size_t len; @@ -3482,7 +3484,7 @@ static void check_large_read(struct fuse_args *args) static int read_password(void) { int size = getpagesize(); - int max_password = 64; + int max_password = MIN(MAX_PASSWORD, size - 1); int n; sshfs.password = mmap(NULL, size, PROT_READ | PROT_WRITE, -- cgit v1.2.3