tor before 0.4.9.9 was prone to an infinite loop when decompressing a truncated zlib/gzip stream with done=1. A truncated stream never reaches ZSTREAMEND, causing zlib to return ZBUFERROR with no input remaining, which bufaddcompress() mistook for a full output buffer and retried forever. Fixed by returning TORCOMPRESSERROR in that case so the caller can abort cleanly. This is TROVE-2026-021.