diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-01-02 01:20:32 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-01-02 01:20:32 +0000 |
commit | 650d8360f968a821468bb81158dd1744b0318479 (patch) | |
tree | 3e0cfc9f9fe00885f4158971d6d22eff433b7eef /usr.bin/ssh/sftp-client.c | |
parent | 13785fe278e6bcfd426efe41f57432eb2c1f3173 (diff) |
use a common max. packet length, no binary change
Diffstat (limited to 'usr.bin/ssh/sftp-client.c')
-rw-r--r-- | usr.bin/ssh/sftp-client.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 8ac93f34343..c83b09ef2fd 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/sftp-client.c @@ -20,7 +20,7 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.57 2005/07/27 10:39:03 dtucker Exp $"); +RCSID("$OpenBSD: sftp-client.c,v 1.58 2006/01/02 01:20:31 djm Exp $"); #include <sys/queue.h> @@ -42,9 +42,6 @@ extern int showprogress; /* Minimum amount of data to read at at time */ #define MIN_READ_SIZE 512 -/* Maximum packet size */ -#define MAX_MSG_LENGTH (256 * 1024) - struct sftp_conn { int fd_in; int fd_out; @@ -59,7 +56,7 @@ send_msg(int fd, Buffer *m) { u_char mlen[4]; - if (buffer_len(m) > MAX_MSG_LENGTH) + if (buffer_len(m) > SFTP_MAX_MSG_LENGTH) fatal("Outbound message too long %u", buffer_len(m)); /* Send length first */ @@ -87,7 +84,7 @@ get_msg(int fd, Buffer *m) } msg_len = buffer_get_int(m); - if (msg_len > MAX_MSG_LENGTH) + if (msg_len > SFTP_MAX_MSG_LENGTH) fatal("Received message too long %u", msg_len); buffer_append_space(m, msg_len); |