]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Correct the fix to bug 22629 to permit trailing non-garbage
authorNick Mathewson <nickm@torproject.org>
Tue, 20 Jun 2017 14:24:22 +0000 (10:24 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 20 Jun 2017 14:24:22 +0000 (10:24 -0400)
This change makes it so that we can decompress concatenated zstd
outputs.

src/common/compress.c

index e65894d9d2e37e1b9e3c2b1a19af28f780214b93..c6c3897989f026fd86e4ff3dbfd55d87e30d6922 100644 (file)
@@ -150,13 +150,7 @@ tor_compress_impl(int compress,
                     method, compression_level, in_len);
           goto err;
         } else {
-          if (in_len != 0) {
-            log_fn(protocol_warn_level, LD_PROTOCOL,
-                   "Unexpected extra input while decompressing");
-            log_debug(LD_GENERAL, "method: %d level: %d at len: %zd",
-                      method, compression_level, in_len);
-            goto err;
-          } else {
+          if (in_len == 0) {
             goto done;
           }
         }