From d9973b43c150d30ae0ea0a4c07c1d4df079881b1 Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 16 Jan 2014 07:31:09 +0000 Subject: [PATCH] needless and incorrect cast to size_t can break resumption of large download; patch from tobias@ --- usr.bin/ssh/sftp-client.c | 4 ++-- 1 file 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 * @@ -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: -- 2.20.1