summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--sftp-client.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 880763a7d..ada012fb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
3 hardening flags including -fstack-protector-strong. These default to on 3 hardening flags including -fstack-protector-strong. These default to on
4 if the toolchain supports them, but there is a configure-time knob 4 if the toolchain supports them, but there is a configure-time knob
5 (--without-hardening) to disable them if necessary. ok djm@ 5 (--without-hardening) to disable them if necessary. ok djm@
6 - (djm) [sftp-client.c] signed/unsigned comparison fix
6 7
720140118 820140118
8 - (djm) OpenBSD CVS Sync 9 - (djm) OpenBSD CVS Sync
diff --git a/sftp-client.c b/sftp-client.c
index cb4e0c4b1..e3c630837 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1104,7 +1104,11 @@ 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 (st.st_size > size) { 1107 if (st.st_size < 0) {
1108 error("\"%s\" has negative size", local_path);
1109 goto fail;
1110 }
1111 if ((u_int64_t)st.st_size > size) {
1108 error("Unable to resume download of \"%s\": " 1112 error("Unable to resume download of \"%s\": "
1109 "local file is larger than remote", local_path); 1113 "local file is larger than remote", local_path);
1110 fail: 1114 fail: