Mailing List Archive

[PATCH 5/5] sftp-server: increase max "read" size to 255 KiB
The server max packet size has been 256 KiB for a long time. Using a
read limit of 64 KiB when we already pulled in 256 KiB doesn't make
much sense, and is awfully low with modern computing. Set the limit
to just below what the server already accepts for its packets.
---
sftp-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sftp-server.c b/sftp-server.c
index c9500d9900b2..5e5445ebe73f 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -55,7 +55,7 @@
char *sftp_realpath(const char *, char *); /* sftp-realpath.c */

/* Maximum data read that we are willing to accept */
-#define SFTP_MAX_READ_LENGTH (64 * 1024)
+#define SFTP_MAX_READ_LENGTH (SFTP_MAX_MSG_LENGTH - 1024)

/* Our verbosity */
static LogLevel log_level = SYSLOG_LEVEL_ERROR;
--
2.28.0

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev