[openssh-commits] [openssh] 09/15: upstream: fix off-by-one error that caused sftp downloads to make

git+noreply at mindrot.org git+noreply at mindrot.org
Wed May 27 21:55:08 AEST 2020


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

djm pushed a commit to branch master
in repository openssh.

commit af8b16fb2cce880341c0ee570ceb0d84104bdcc0
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri May 15 03:57:33 2020 +0000

    upstream: fix off-by-one error that caused sftp downloads to make
    
    one more concurrent request that desired. This prevented using sftp(1) in
    unpipelined request/response mode, which is useful when debugging. Patch from
    Stephen Goetze in bz#3054
    
    OpenBSD-Commit-ID: 41b394ebe57037dbc43bdd0eef21ff0511191f28
---
 sftp-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sftp-client.c b/sftp-client.c
index 72f7fff7..b8e131be 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.135 2019/10/04 04:31:59 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.136 2020/05/15 03:57:33 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
  *
@@ -1415,7 +1415,7 @@ do_download(struct sftp_conn *conn, const char *remote_path,
 					    (unsigned long long)offset,
 					    num_req);
 					max_req = 1;
-				} else if (max_req <= conn->num_requests) {
+				} else if (max_req < conn->num_requests) {
 					++max_req;
 				}
 			}

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


More information about the openssh-commits mailing list