Explorar el Código

another write_to_buf_zlib fix.

svn:r6656
Nick Mathewson hace 19 años
padre
commit
5ba72d0ae5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/or/buffers.c

+ 1 - 1
src/or/buffers.c

@@ -1305,7 +1305,7 @@ write_to_buf_zlib(buf_t *buf, tor_zlib_state_t *state,
     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;