]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Apparently, zlib sometimes reports Z_BUF_ERROR on input exhaustion as well as on...
authorNick Mathewson <nickm@torproject.org>
Sat, 24 Jun 2006 02:06:52 +0000 (02:06 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 24 Jun 2006 02:06:52 +0000 (02:06 +0000)
svn:r6682

src/common/torgzip.c

index c08ed514d8b4671cab6ab3af99b08cf784e9ae6f..aca8386cc7977cdde74636a3cb978cd7193b9f44 100644 (file)
@@ -348,6 +348,8 @@ tor_zlib_process(tor_zlib_state_t *state,
     case Z_STREAM_END:
       return TOR_ZLIB_DONE;
     case Z_BUF_ERROR:
+      if (state->stream.avail_in == 0)
+        return Z_OK;
       return TOR_ZLIB_BUF_FULL;
     case Z_OK:
       if (state->stream.avail_out == 0)