summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-28 18:54:40 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-28 18:54:40 -0400
commitfba30b8b26a787b2e671b7d05f72449afc5a026a (patch)
tree8f88c6570cfbbc76518e076548bedfde19d3048a
parent411074501789d742b412034a9299c8e3d0569347 (diff)
parentc2fac2c6b0f9a2bdc9198cca900dbbf3440c34d1 (diff)
downloadtor-fba30b8b26a787b2e671b7d05f72449afc5a026a.tar.gz
tor-fba30b8b26a787b2e671b7d05f72449afc5a026a.zip
Merge remote-tracking branch 'ahf-gitlab/bugs/23551'
-rw-r--r--src/common/buffers.c2
-rw-r--r--src/common/compress.c6
-rw-r--r--src/test/test_util.c3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/common/buffers.c b/src/common/buffers.c
index bf10c55962..e9e4487832 100644
--- a/src/common/buffers.c
+++ b/src/common/buffers.c
@@ -964,7 +964,7 @@ buf_get_line(buf_t *buf, char *data_out, size_t *data_len)
return 1;
}
-/** Compress on uncompress the <b>data_len</b> bytes in <b>data</b> using the
+/** Compress or uncompress the <b>data_len</b> bytes in <b>data</b> using the
* compression state <b>state</b>, appending the result to <b>buf</b>. If
* <b>done</b> is true, flush the data in the state and finish the
* compression/uncompression. Return -1 on failure, 0 on success. */
diff --git a/src/common/compress.c b/src/common/compress.c
index f178915467..bc12a58ad6 100644
--- a/src/common/compress.c
+++ b/src/common/compress.c
@@ -562,9 +562,9 @@ tor_compress_process(tor_compress_state_t *state,
finish);
break;
case LZMA_METHOD:
- rv =tor_lzma_compress_process(state->u.lzma_state,
- out, out_len, in, in_len,
- finish);
+ rv = tor_lzma_compress_process(state->u.lzma_state,
+ out, out_len, in, in_len,
+ finish);
break;
case ZSTD_METHOD:
rv = tor_zstd_compress_process(state->u.zstd_state,
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 162f6fbc0a..a46e82c715 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -6086,8 +6086,7 @@ struct testcase_t util_tests[] = {
COMPRESS_DOS(zlib, "deflate"),
COMPRESS_DOS(gzip, "gzip"),
COMPRESS_DOS(lzma, "x-tor-lzma"),
- // Disabled for now, since it triggers #23551
- // COMPRESS_DOS(zstd, "x-zstd"),
+ COMPRESS_DOS(zstd, "x-zstd"),
UTIL_TEST(gzip_compression_bomb, TT_FORK),
UTIL_LEGACY(datadir),
UTIL_LEGACY(memarea),