summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2014-01-16 07:31:10 +0000
committerDamien Miller <djm@cvs.openbsd.org>2014-01-16 07:31:10 +0000
commit7ae80409d8fd01f6707dcad769fc67198f0f888c (patch)
treef47d25c77680ba64e726d9d457048dc85c080927
parent2beb74738ad28efd755017482d47401650145921 (diff)
needless and incorrect cast to size_t can break resumption of
large download; patch from tobias@
-rw-r--r--usr.bin/ssh/sftp-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c
index 9ef05cb9600..fc6880d12e0 100644
--- a/usr.bin/ssh/sftp-client.c
+++ b/usr.bin/ssh/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>
*
@@ -1097,7 +1097,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: