summaryrefslogtreecommitdiffstats
path: root/sftp-client.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-01-16 08:42:10 +0100
committerDamien Miller <djm@mindrot.org>2014-01-16 08:42:10 +0100
commit52c371cd6d2598cc73d4e633811b3012119c47e2 (patch)
tree5c3611626856f0ac4f90fe9b46bd8b6bacca6954 /sftp-client.c
parent - djm@cvs.openbsd.org 2014/01/12 08:13:13 (diff)
downloadopenssh-52c371cd6d2598cc73d4e633811b3012119c47e2.tar.xz
openssh-52c371cd6d2598cc73d4e633811b3012119c47e2.zip
- 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 @@
-/* $OpenBSD: sftp-client.c,v 1.111 2013/12/05 22:59:45 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.112 2014/01/16 07:31:09 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1104,7 +1104,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
local_path, strerror(errno));
goto fail;
}
- if ((size_t)st.st_size > size) {
+ if (st.st_size > size) {
error("Unable to resume download of \"%s\": "
"local file is larger than remote", local_path);
fail: