diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-15 18:13:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-15 18:13:38 -0400 |
commit | d3279d4304f5ebae0d1612e6c16d20e27b8e8790 (patch) | |
tree | 257f2a7902d22d783e660a564350caaff30bba34 /src/or | |
parent | 460b9230263f0af40c08d8e97f5f13aa69127bf6 (diff) | |
download | tor-d3279d4304f5ebae0d1612e6c16d20e27b8e8790.tar.gz tor-d3279d4304f5ebae0d1612e6c16d20e27b8e8790.zip |
Do not try to uncompress an empty spool
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index aca3030ea1..15f7491fc6 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -4081,7 +4081,7 @@ handle_get_current_consensus(dir_connection_t *conn, vary_header, smartlist_len(conn->spool) == 1 ? lifetime : 0); - if (compress_method == NO_METHOD) + if (compress_method == NO_METHOD && smartlist_len(conn->spool)) conn->compress_state = tor_compress_new(0, compression_used, HIGH_COMPRESSION); |