aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-04-14 11:01:19 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-04-14 11:01:19 +0200
commite4e14109ade6398ecae5ae882635410b606b2649 (patch)
tree601bcdab082306df34585a3074f4171fb8a11334 /sshfs.c
parent48122e8043c0d7393688346f7567dff89dcc772b (diff)
downloadsshfs-e4e14109ade6398ecae5ae882635410b606b2649.tar
sshfs-e4e14109ade6398ecae5ae882635410b606b2649.tar.gz
sshfs-e4e14109ade6398ecae5ae882635410b606b2649.tar.bz2
sshfs-e4e14109ade6398ecae5ae882635410b606b2649.zip
sshfs: Increase the maximum length of the password
read from stdin to 1024 characters. Reported by: Mario A. Valdez-Ramirez.
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c4
1 files changed, 3 insertions, 1 deletions
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,