aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
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,