View | Details | Raw Unified | Return to bug 790
Collapse All | Expand All

(-)src/crypto/openssh/channels.c (-4 / +15 lines)
Lines 1711-1722 channel_input_data(int type, u_int32_t s Link Here
1711
	    c->type != SSH_CHANNEL_X11_OPEN)
1711
	    c->type != SSH_CHANNEL_X11_OPEN)
1712
		return;
1712
		return;
1713
1713
1714
	/* same for protocol 1.5 if output end is no longer open */
1715
	if (!compat13 && c->ostate != CHAN_OUTPUT_OPEN)
1716
		return;
1717
1718
	/* Get the data. */
1714
	/* Get the data. */
1719
	data = packet_get_string(&data_len);
1715
	data = packet_get_string(&data_len);
1716
1717
	/*
1718
	 * same for protocol 1.5 if output end is no longer open.  Note that
1719
	 * the sending side is reducing its window as it sends data.  We must
1720
	 * 'fake' consumption of the data in order to ensure that window
1721
	 * updates are sent back or a premature EPIPE on an ssh client output
1722
	 * may while the server has a lot more data to send will deadlock
1723
	 * the connection.
1724
	 */
1725
	if (!compat13 && c->ostate != CHAN_OUTPUT_OPEN) {
1726
		c->local_window -= data_len;
1727
		c->local_consumed += data_len;
1728
		xfree(data);
1729
		return;
1730
	}
1720
1731
1721
	if (compat20) {
1732
	if (compat20) {
1722
		if (data_len > c->local_maxpacket) {
1733
		if (data_len > c->local_maxpacket) {

Return to bug 790