From 33de2bc080dd08a6767440e61ceba6ce33234761 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 May 2016 11:50:12 +0200 Subject: Fix segfault in xz compression/decompression --- src/libutil/compression.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libutil/compression.cc') diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index 4d15d2acdd4e..ec63855f6c4b 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -11,7 +11,7 @@ namespace nix { static ref compressXZ(const std::string & in) { - lzma_stream strm; + lzma_stream strm(LZMA_STREAM_INIT); // FIXME: apply the x86 BCJ filter? @@ -54,7 +54,7 @@ static ref compressXZ(const std::string & in) static ref decompressXZ(const std::string & in) { - lzma_stream strm; + lzma_stream strm(LZMA_STREAM_INIT); lzma_ret ret = lzma_stream_decoder( &strm, UINT64_MAX, LZMA_CONCATENATED); -- cgit 1.4.1