diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-05-16 19:32:20 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-05-17 13:23:33 +0000 |
commit | d74467e8583b8ff50417b84994c7a87250aef771 (patch) | |
tree | 7b6b35122fb255167ae4453185f5dd34649000b6 /src/test/test_util.c | |
parent | 3772fdf756a13f7b6a8e713e5d53eb5d7b2785cd (diff) | |
download | tor-d74467e8583b8ff50417b84994c7a87250aef771.tar.gz tor-d74467e8583b8ff50417b84994c7a87250aef771.zip |
Check that tor_compress_state_size() returns a value larger than zero.
See: https://bugs.torproject.org/22286
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 654498fbb0..0b087d1710 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. */ |