[openssh-commits] [openssh] 03/04: upstream: check the return value of ssh_packet_write_poll() and

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Jan 30 18:22:42 AEDT 2020


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

djm pushed a commit to branch master
in repository openssh.

commit 65d6fd0a8a6f31c3ddf0c1192429a176575cf701
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Thu Jan 30 07:20:57 2020 +0000

    upstream: check the return value of ssh_packet_write_poll() and
    
    call sshpkt_fatal() if it fails; avoid potential busy-loop under some
    circumstances. Based on patch by Mike Frysinger; ok dtucker@
    
    OpenBSD-Commit-ID: c79fe5cf4f0cd8074cb6db257c1394d5139408ec
---
 clientloop.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/clientloop.c b/clientloop.c
index 17015544..2590962b 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.337 2020/01/29 08:17:49 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.338 2020/01/30 07:20:57 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1392,8 +1392,12 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
 		 * Send as much buffered packet data as possible to the
 		 * sender.
 		 */
-		if (FD_ISSET(connection_out, writeset))
-			ssh_packet_write_poll(ssh);
+		if (FD_ISSET(connection_out, writeset)) {
+			if ((r = ssh_packet_write_poll(ssh)) != 0) {
+				sshpkt_fatal(ssh, r,
+				    "%s: ssh_packet_write_poll", __func__);
+			}
+		}
 
 		/*
 		 * If we are a backgrounded control master, and the

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


More information about the openssh-commits mailing list