diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshfs.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2015-04-14 Miklos Szeredi <miklos@szeredi.hu> + + * 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 <miklos@szeredi.hu> * sshfs: return the correct X_OK access. Reported by: Alkis @@ -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, |