diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sftp-client.c | 12 |
2 files changed, 12 insertions, 6 deletions
@@ -55,6 +55,10 @@ | |||
55 | - djm@cvs.openbsd.org 2007/09/13 04:39:04 | 55 | - djm@cvs.openbsd.org 2007/09/13 04:39:04 |
56 | [sftp-server.c] | 56 | [sftp-server.c] |
57 | fix incorrect test when setting syslog facility; from Jan Pechanec | 57 | fix incorrect test when setting syslog facility; from Jan Pechanec |
58 | - djm@cvs.openbsd.org 2007/09/16 00:55:52 | ||
59 | [sftp-client.c] | ||
60 | use off_t instead of u_int64_t for file offsets, matching what the | ||
61 | progressmeter code expects; bz #842 | ||
58 | 62 | ||
59 | 20070914 | 63 | 20070914 |
60 | - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. | 64 | - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. |
@@ -3252,4 +3256,4 @@ | |||
3252 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3256 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3253 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3257 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3254 | 3258 | ||
3255 | $Id: ChangeLog,v 1.4755 2007/09/17 06:11:33 djm Exp $ | 3259 | $Id: ChangeLog,v 1.4756 2007/09/17 06:12:03 djm Exp $ |
diff --git a/sftp-client.c b/sftp-client.c index 2746f3245..c12d1d38e 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.c,v 1.76 2007/01/22 11:32:50 djm Exp $ */ | 1 | /* $OpenBSD: sftp-client.c,v 1.77 2007/09/16 00:55:52 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -994,7 +994,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
994 | { | 994 | { |
995 | int local_fd, status; | 995 | int local_fd, status; |
996 | u_int handle_len, id, type; | 996 | u_int handle_len, id, type; |
997 | u_int64_t offset; | 997 | off_t offset; |
998 | char *handle, *data; | 998 | char *handle, *data; |
999 | Buffer msg; | 999 | Buffer msg; |
1000 | struct stat sb; | 1000 | struct stat sb; |
@@ -1004,7 +1004,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
1004 | struct outstanding_ack { | 1004 | struct outstanding_ack { |
1005 | u_int id; | 1005 | u_int id; |
1006 | u_int len; | 1006 | u_int len; |
1007 | u_int64_t offset; | 1007 | off_t offset; |
1008 | TAILQ_ENTRY(outstanding_ack) tq; | 1008 | TAILQ_ENTRY(outstanding_ack) tq; |
1009 | }; | 1009 | }; |
1010 | TAILQ_HEAD(ackhead, outstanding_ack) acks; | 1010 | TAILQ_HEAD(ackhead, outstanding_ack) acks; |
@@ -1143,12 +1143,14 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
1143 | status = -1; | 1143 | status = -1; |
1144 | goto done; | 1144 | goto done; |
1145 | } | 1145 | } |
1146 | debug3("In write loop, ack for %u %u bytes at %llu", | 1146 | debug3("In write loop, ack for %u %u bytes at %lld", |
1147 | ack->id, ack->len, (unsigned long long)ack->offset); | 1147 | ack->id, ack->len, (long long)ack->offset); |
1148 | ++ackid; | 1148 | ++ackid; |
1149 | xfree(ack); | 1149 | xfree(ack); |
1150 | } | 1150 | } |
1151 | offset += len; | 1151 | offset += len; |
1152 | if (offset < 0) | ||
1153 | fatal("%s: offset < 0", __func__); | ||
1152 | } | 1154 | } |
1153 | if (showprogress) | 1155 | if (showprogress) |
1154 | stop_progress_meter(); | 1156 | stop_progress_meter(); |