[or-cvs] [tor/master 2/2] Don't throw away incomplete SOCKS proxy responses.

nickm at torproject.org nickm at torproject.org
Mon Jan 3 18:05:58 UTC 2011


Author: Robert Ransom <rransom.8774 at gmail.com>
Date: Wed, 29 Dec 2010 05:19:09 -0800
Subject: Don't throw away incomplete SOCKS proxy responses.
Commit: 305ba230fef87c072e31ed4fc5acfa2d371e948c

Introduced in 9796b9bfa6a757780d6185547e4baf739c53cdac.
---
 src/or/buffers.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index 81d54d6..4e525db 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -1964,7 +1964,7 @@ fetch_from_evbuffer_socks_client(struct evbuffer *buf, int state,
   r = parse_socks_client(data, datalen, state, reason, &drain);
   if (drain > 0)
     evbuffer_drain(buf, drain);
-  else
+  else if (drain < 0)
     evbuffer_drain(buf, evbuffer_get_length(buf));
 
   return r;
-- 
1.7.1



More information about the tor-commits mailing list