summaryrefslogtreecommitdiff
path: root/src/common/torgzip.h
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-04-18 03:12:19 +0200
committerAlexander Færøy <ahf@torproject.org>2017-04-18 03:12:19 +0200
commite6c6606a17841eaf263967254990db5e9443942d (patch)
treeb007f39f778b7a28172a1267657be096e7b61e86 /src/common/torgzip.h
parent6b5172bcf2018f858d38f5dea13753b8238b15ae (diff)
downloadtor-e6c6606a17841eaf263967254990db5e9443942d.tar.gz
tor-e6c6606a17841eaf263967254990db5e9443942d.zip
Expose `tor_compress_is_compression_bomb()` as part of the public compression API.
This patch exposes the old `is_compression_bomb()` function as a public API as part of the compression module. See https://bugs.torproject.org/21663
Diffstat (limited to 'src/common/torgzip.h')
-rw-r--r--src/common/torgzip.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/torgzip.h b/src/common/torgzip.h
index 8f2363aa1e..fa566282d7 100644
--- a/src/common/torgzip.h
+++ b/src/common/torgzip.h
@@ -49,6 +49,9 @@ compress_method_t detect_compression_method(const char *in, size_t in_len);
int
tor_compress_memory_level(compression_level_t level);
+int
+tor_compress_is_compression_bomb(size_t size_in, size_t size_out);
+
/** Return values from tor_compress_process; see that function's documentation
* for details. */
typedef enum {