- (djm) [sftp-client.c] signed/unsigned comparison fix
This commit is contained in:
parent
fd994379dd
commit
c3d483f9a8
|
@ -3,6 +3,7 @@
|
|||
hardening flags including -fstack-protector-strong. These default to on
|
||||
if the toolchain supports them, but there is a configure-time knob
|
||||
(--without-hardening) to disable them if necessary. ok djm@
|
||||
- (djm) [sftp-client.c] signed/unsigned comparison fix
|
||||
|
||||
20140118
|
||||
- (djm) OpenBSD CVS Sync
|
||||
|
|
|
@ -1104,7 +1104,11 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
|
|||
local_path, strerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
if (st.st_size > size) {
|
||||
if (st.st_size < 0) {
|
||||
error("\"%s\" has negative size", local_path);
|
||||
goto fail;
|
||||
}
|
||||
if ((u_int64_t)st.st_size > size) {
|
||||
error("Unable to resume download of \"%s\": "
|
||||
"local file is larger than remote", local_path);
|
||||
fail:
|
||||
|
|
Loading…
Reference in New Issue