diff options
Diffstat (limited to 'Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c')
-rw-r--r-- | Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c b/Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c index ae75315..9e2e1da 100644 --- a/Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c +++ b/Utilities/cmliblzma/liblzma/common/stream_buffer_decoder.c @@ -19,6 +19,9 @@ lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) { + lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT; + lzma_ret ret; + // Sanity checks if (in_pos == NULL || (in == NULL && *in_pos != in_size) || *in_pos > in_size || out_pos == NULL @@ -33,8 +36,7 @@ lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags, // Initialize the Stream decoder. // TODO: We need something to tell the decoder that it can use the // output buffer as workspace, and thus save significant amount of RAM. - lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT; - lzma_ret ret = lzma_stream_decoder_init( + ret = lzma_stream_decoder_init( &stream_decoder, allocator, *memlimit, flags); if (ret == LZMA_OK) { |