[tor-commits] [tor/maint-0.3.1] Check that tor_compress_state_size() returns a value larger than zero.
nickm at torproject.org
nickm at torproject.org
Tue Aug 8 14:10:57 UTC 2017
commit d74467e8583b8ff50417b84994c7a87250aef771
Author: Alexander Færøy <ahf at torproject.org>
Date: Tue May 16 19:32:20 2017 +0000
Check that tor_compress_state_size() returns a value larger than zero.
See: https://bugs.torproject.org/22286
---
src/test/test_util.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 654498fbb..0b087d171 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2358,6 +2358,8 @@ test_util_compress_stream_impl(compress_method_t method,
tt_assert(cp1 > cp2); /* Make sure we really added something. */
}
+ tt_int_op(tor_compress_state_size(state), OP_GT, 0);
+
tt_assert(!tor_uncompress(&buf3, &len2, buf1, 1024-len1,
method, 1, LOG_WARN));
/* Make sure it compressed right. */
More information about the tor-commits
mailing list