summaryrefslogtreecommitdiff
path: root/sftp-client.c
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 /sftp-client.c
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@
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c4
1 files changed, 2 insertions, 2 deletions
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: