Fix return type in test_hs_intropoint.c

In trunnel, {struct}_encoded_len() can return negative values.

Coverity caught this as 1398957.
This commit is contained in:
Nick Mathewson 2017-01-19 08:26:55 -05:00
parent d35ca518b4
commit 9023d7361d

View File

@ -761,7 +761,7 @@ test_received_introduce1_handling(void *arg)
/* Valid case. */ /* Valid case. */
{ {
cell = helper_create_introduce1_cell(); 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); tt_size_op(request_len, OP_GT, 0);
request = tor_malloc_zero(request_len); request = tor_malloc_zero(request_len);
ssize_t encoded_len = ssize_t encoded_len =