summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-01-16 18:42:10 +1100
committerDamien Miller <djm@mindrot.org>2014-01-16 18:42:10 +1100
commit52c371cd6d2598cc73d4e633811b3012119c47e2 (patch)
tree5c3611626856f0ac4f90fe9b46bd8b6bacca6954
parent91b580e4bec55118bf96ab3cdbe5a50839e75d0a (diff)
- djm@cvs.openbsd.org 2014/01/16 07:31:09
[sftp-client.c] needless and incorrect cast to size_t can break resumption of large download; patch from tobias@
-rw-r--r--ChangeLog7
-rw-r--r--sftp-client.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e30cec1a4..f8f432e7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
120140118
2 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2014/01/16 07:31:09
4 [sftp-client.c]
5 needless and incorrect cast to size_t can break resumption of
6 large download; patch from tobias@
7
120140112 820140112
2 - (djm) OpenBSD CVS Sync 9 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2014/01/10 05:59:19 10 - djm@cvs.openbsd.org 2014/01/10 05:59:19
diff --git a/sftp-client.c b/sftp-client.c
index 1eb821086..cb4e0c4b1 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.111 2013/12/05 22:59:45 djm Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.112 2014/01/16 07:31:09 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 *
@@ -1104,7 +1104,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
1104 local_path, strerror(errno)); 1104 local_path, strerror(errno));
1105 goto fail; 1105 goto fail;
1106 } 1106 }
1107 if ((size_t)st.st_size > size) { 1107 if (st.st_size > size) {
1108 error("Unable to resume download of \"%s\": " 1108 error("Unable to resume download of \"%s\": "
1109 "local file is larger than remote", local_path); 1109 "local file is larger than remote", local_path);
1110 fail: 1110 fail: