소스 검색

Check that tor_compress_state_size() returns a value larger than zero.

See: https://bugs.torproject.org/22286
Alexander Færøy 8 년 전
부모
커밋
d74467e858
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/test/test_util.c

+ 2 - 0
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. */