Explorar o código

Correct the fix to bug 22629 to permit trailing non-garbage

This change makes it so that we can decompress concatenated zstd
outputs.
Nick Mathewson %!s(int64=7) %!d(string=hai) anos
pai
achega
eb632afb17
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      src/common/compress.c

+ 1 - 7
src/common/compress.c

@@ -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;
           }
         }