[openssh-commits] [openssh] 02/05: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Thu May 28 18:55:08 AEST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 9cc6842493fbf23025ccc1edab064869640d3bec
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Thu May 28 04:50:53 2015 +0000

    upstream commit
    
    add error message on ftruncate failure; bz#2176
    
    Upstream-ID: cbcc606e0b748520c74a210d8f3cc9718d3148cf
---
 sftp-client.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sftp-client.c b/sftp-client.c
index d12ca26..5dbeb47 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.119 2015/05/23 14:28:37 jsg Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.120 2015/05/28 04:50:53 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
  *
@@ -1385,7 +1385,9 @@ do_download(struct sftp_conn *conn, const char *remote_path,
 			    "server reordered requests", local_path);
 		}
 		debug("truncating at %llu", (unsigned long long)highwater);
-		ftruncate(local_fd, highwater);
+		if (ftruncate(local_fd, highwater) == -1)
+			error("ftruncate \"%s\": %s", local_path,
+			    strerror(errno));
 	}
 	if (read_error) {
 		error("Couldn't read from remote file \"%s\" : %s",

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list