From 1c45c7101a87696610eb03fa0ae63447c3f8e1b2 Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Sat, 3 Oct 2020 21:00:51 +0545 Subject: [PATCH] fixed lzo datatype (#447) Co-authored-by: Logan007 --- src/edge_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/edge_utils.c b/src/edge_utils.c index d063810..17dc363 100644 --- a/src/edge_utils.c +++ b/src/edge_utils.c @@ -1059,20 +1059,20 @@ static int handle_PACKET(n2n_edge_t * eee, /* decompress if necessary */ uint8_t * deflation_buffer = 0; - int32_t deflated_len; + lzo_uint deflated_len; switch (rx_compression_id) { case N2N_COMPRESSION_ID_NONE: break; // continue afterwards case N2N_COMPRESSION_ID_LZO: deflation_buffer = malloc (N2N_PKT_BUF_SIZE); - lzo1x_decompress (eth_payload, eth_size, deflation_buffer, (lzo_uint*)&deflated_len, NULL); + lzo1x_decompress (eth_payload, eth_size, deflation_buffer, &deflated_len, NULL); break; #ifdef N2N_HAVE_ZSTD case N2N_COMPRESSION_ID_ZSTD: deflated_len = N2N_PKT_BUF_SIZE; deflation_buffer = malloc (deflated_len); - deflated_len = (int32_t)ZSTD_decompress (deflation_buffer, deflated_len, eth_payload, eth_size); + deflated_len = ZSTD_decompress (deflation_buffer, deflated_len, eth_payload, eth_size); if(ZSTD_isError(deflated_len)) { traceEvent (TRACE_ERROR, "payload decompression failed with zstd error '%s'.", ZSTD_getErrorName(deflated_len));