|
@@ -105,10 +105,10 @@ method_bits(compress_method_t method, compression_level_t level)
|
|
|
#define CHECK_FOR_COMPRESSION_BOMB_AFTER (1024*64)
|
|
|
/** @} */
|
|
|
|
|
|
-/** Return true if uncompressing an input of size <b>in_size</b> to an input
|
|
|
- * of size at least <b>size_out</b> looks like a compression bomb. */
|
|
|
-static int
|
|
|
-is_compression_bomb(size_t size_in, size_t size_out)
|
|
|
+/** Return true if uncompressing an input of size <b>in_size</b> to an input of
|
|
|
+ * size at least <b>size_out</b> looks like a compression bomb. */
|
|
|
+int
|
|
|
+tor_compress_is_compression_bomb(size_t size_in, size_t size_out)
|
|
|
{
|
|
|
if (size_in == 0 || size_out < CHECK_FOR_COMPRESSION_BOMB_AFTER)
|
|
|
return 0;
|