diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2005-07-08 09:41:34 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2005-07-08 09:41:34 +0000 |
commit | 90fe78576ba39ed40ad3193572aab9de0134d26f (patch) | |
tree | d7eef4da46883249332e036748ec8e75f2044383 /usr.bin/ssh | |
parent | 32f409b8f1bf4eedca3312769d00bec15d4468e7 (diff) |
race when efd gets closed while there is still buffered data:
change CHANNEL_EFD_OUTPUT_ACTIVE()
1) c->efd must always be valid AND
2a) no EOF has been seen OR
2b) there is buffered data
report, initial fix and testing Chuck Cranor
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/channels.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index 071d6833906..139a41826e7 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.77 2005/06/16 03:38:36 djm Exp $ */ +/* $OpenBSD: channels.h,v 1.78 2005/07/08 09:41:33 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -148,7 +148,7 @@ struct Channel { buffer_len(&c->extended) > 0)) #define CHANNEL_EFD_OUTPUT_ACTIVE(c) \ (compat20 && c->extended_usage == CHAN_EXTENDED_WRITE && \ - ((c->efd != -1 && !(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD))) || \ + c->efd != -1 && (!(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD)) || \ buffer_len(&c->extended) > 0)) /* channel management */ |