Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #11824

Closed (moved)
Open
Opened May 08, 2014 by Nick Mathewson@nickm🐭

tor_zlib_process fails when trying to finish with no input or output bytes.

zlib reports Z_BUF_ERROR when it is out of input or out of output. Currently, we handle that with:

    case Z_BUF_ERROR:
      if (state->stream.avail_in == 0)
        return TOR_ZLIB_OK;
      return TOR_ZLIB_BUF_FULL;

But that's wrong -- if avail_in is 0, but finish is set, then we are trying to finalize the stream, and we really do have something to write. That test should be state->stream.avail_in == 0 && !finish)

Marking this for 0.2.5 even though I am pretty sure this can never actually happen with the way write_to_buf_zlib works: write_to_buf_zlib ensures that we are never trying to write into a completely empty buffer, and zlib says "Z_OK" if you give it even one byte to write into.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.6.x-final
Milestone
Tor: 0.2.6.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#11824