diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-07-14 17:05:51 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-07-14 17:05:51 +1000 |
commit | ce377c3ff17b674236de531b4a260f96db803d46 (patch) | |
tree | 66a1a05fdd324d9ca4dbc8b369f308869641cfc6 /channels.h | |
parent | bee73d5ce0dec4e011174b321e7d52fac3150691 (diff) |
- markus@cvs.openbsd.org 2005/07/08 09:41:33
[channels.h]
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 'channels.h')
-rw-r--r-- | channels.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels.h b/channels.h index f87db6afb..b89b7c95d 100644 --- a/channels.h +++ b/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> @@ -149,7 +149,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 */ |