diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-28 12:20:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-28 12:20:02 -0400 |
commit | 3a073c463dbade2171a1a6ec1558bd81c0ff27f9 (patch) | |
tree | 28d329ccf721ef02e2e7973337b94e84fc88d3f2 /src/common/compress.h | |
parent | 14614a592e43e2a6fcddb79c3f4ff5c8df60f380 (diff) | |
download | tor-3a073c463dbade2171a1a6ec1558bd81c0ff27f9.tar.gz tor-3a073c463dbade2171a1a6ec1558bd81c0ff27f9.zip |
Improve unit test coverage for compression code.
These tests try uncompressing garbage, verify that we won't
make compression bombs, and verify that we won't uncompress
compression bombs.
Diffstat (limited to 'src/common/compress.h')
-rw-r--r-- | src/common/compress.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/compress.h b/src/common/compress.h index ecb20668e4..23a9817479 100644 --- a/src/common/compress.h +++ b/src/common/compress.h @@ -45,7 +45,8 @@ int tor_uncompress(char **out, size_t *out_len, compress_method_t detect_compression_method(const char *in, size_t in_len); -int tor_compress_is_compression_bomb(size_t size_in, size_t size_out); +MOCK_DECL(int,tor_compress_is_compression_bomb,(size_t size_in, + size_t size_out)); int tor_compress_supports_method(compress_method_t method); unsigned tor_compress_get_supported_method_bitmask(void); |