lzma_stream strm = LZMA_STREAM_INIT;
assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, 0), LZMA_OK);
- uint8_t *output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
+ uint8_t output_buffer[DECODE_CHUNK_SIZE];
strm.next_in = data;
strm.next_out = output_buffer;
checksum = lzma_crc32(output_buffer,
(size_t)(strm.next_out - output_buffer),
checksum);
- // No need to free output_buffer because it will
- // automatically be freed at the end of the test by
- // tuktest.
- output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
strm.next_out = output_buffer;
strm.avail_out = DECODE_CHUNK_SIZE;
}
assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT,
LZMA_CONCATENATED), LZMA_OK);
- uint8_t *output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
+ uint8_t output_buffer[DECODE_CHUNK_SIZE];
strm.next_in = data;
strm.next_out = output_buffer;
checksum = lzma_crc32(output_buffer,
(size_t)(strm.next_out - output_buffer),
checksum);
- // No need to free output_buffer because it will
- // automatically be freed at the end of the test by
- // tuktest.
- output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
strm.next_out = output_buffer;
strm.avail_out = DECODE_CHUNK_SIZE;
}