diff options
author | Alexander Færøy <ahf@torproject.org> | 2023-09-13 16:13:28 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2023-09-13 16:13:28 +0200 |
commit | d9a6b37ab1597ac726e5f972ebfbccf024c58cbc (patch) | |
tree | 23b3f58f0e9762f2ff1f5a2f33b024dfba800490 /src/test | |
parent | d6c89b1ae1b18cc3cae42638d7bbe1edd7e35715 (diff) | |
download | tor-d9a6b37ab1597ac726e5f972ebfbccf024c58cbc.tar.gz tor-d9a6b37ab1597ac726e5f972ebfbccf024c58cbc.zip |
Add diagnostic log message for compression bombs.
This patch causes `tor_compress_is_compression_bomb()` to emit a
warning-level log message that lets us learn the potential ratio of the
input to output buffer sizes. Hopefully, this will give us a bit of a
better idea whether the compression bomb ratio needs some tuning.
See: tpo/core/tor#40739.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 1dae2c617e..391c3d07c1 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -2945,7 +2945,7 @@ test_util_gzip_compression_bomb(void *arg) tt_int_op(-1, OP_EQ, tor_compress(&result, &result_len, one_mb, one_million, ZLIB_METHOD)); - expect_single_log_msg_containing( + expect_log_msg_containing( "We compressed something and got an insanely high " "compression factor; other Tors would think this " "was a compression bomb."); |