summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>1999-11-16 23:04:18 +0000
committermarkus <markus@openbsd.org>1999-11-16 23:04:18 +0000
commit04ce1dcebea173841f2cf999d288c6ed6fcb83d9 (patch)
treef7e174bba09605d92bc420aa39a165ac6d6f5a0d /usr.bin/ssh/serverloop.c
parentadd OpenSSH information to AUTHOR section. okay markus@ (diff)
downloadwireguard-openbsd-04ce1dcebea173841f2cf999d288c6ed6fcb83d9.tar.xz
wireguard-openbsd-04ce1dcebea173841f2cf999d288c6ed6fcb83d9.zip
bugfix: check for space if child has terminated, from: iedowse@maths.tcd.ie
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 552c69c2952..2aec2cf194e 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -269,8 +269,9 @@ retry_select:
if (channel_max_fd() > max_fd)
max_fd = channel_max_fd();
- /* If child has terminated, read as much as is available and then exit. */
- if (child_terminated)
+ /* If child has terminated and there is enough buffer space to read from
+ it, then read as much as is available and exit. */
+ if (child_terminated && packet_not_very_much_data_to_write())
if (max_time_milliseconds == 0)
max_time_milliseconds = 100;