[or-cvs] another write_to_buf_zlib fix.

Nick Mathewson nickm at seul.org
Sun Jun 18 16:20:40 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv24701/src/or

Modified Files:
	buffers.c 
Log Message:
another write_to_buf_zlib fix.

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -p -d -r1.196 -r1.197
--- buffers.c	18 Jun 2006 15:53:54 -0000	1.196
+++ buffers.c	18 Jun 2006 16:20:38 -0000	1.197
@@ -1305,7 +1305,7 @@ write_to_buf_zlib(buf_t *buf, tor_zlib_s
     if (next < buf->cur)
       old_avail = avail = buf->cur - next;
     else
-      old_avail = avail = (buf->mem + buf->datalen) - buf->cur;
+      old_avail = avail = (buf->mem + buf->datalen) - next;
     switch (tor_zlib_process(state, &next, &avail, &data, &data_len, done)) {
       case TOR_ZLIB_DONE:
         over = 1;



More information about the tor-commits mailing list