commit 9023d7361d13629e0bc3de081db974a870d306b0 Author: Nick Mathewson nickm@torproject.org Date: Thu Jan 19 08:26:55 2017 -0500
Fix return type in test_hs_intropoint.c
In trunnel, {struct}_encoded_len() can return negative values.
Coverity caught this as 1398957. --- src/test/test_hs_intropoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 1d620e1..770fff4 100644 --- a/src/test/test_hs_intropoint.c +++ b/src/test/test_hs_intropoint.c @@ -761,7 +761,7 @@ test_received_introduce1_handling(void *arg) /* Valid case. */ { cell = helper_create_introduce1_cell(); - size_t request_len = hs_cell_introduce1_encoded_len(cell); + ssize_t request_len = hs_cell_introduce1_encoded_len(cell); tt_size_op(request_len, OP_GT, 0); request = tor_malloc_zero(request_len); ssize_t encoded_len =