From 59dda97f7f6afecfcc9c96c1559848b688d5f3ec Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Thu, 11 Jan 2018 10:48:43 -0600 Subject: [PATCH] support LZMA concatenated files The xz format supports concatenated files, images are sometimes created and shipped with it to increase compression. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1742744 is the source bug for this issue. --- src/import/import-compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/import/import-compress.c b/src/import/import-compress.c index cb5b982..acb47fe 100644 --- a/src/import/import-compress.c +++ b/src/import/import-compress.c @@ -70,7 +70,7 @@ int import_uncompress_detect(ImportCompress *c, const void *data, size_t size) { if (memcmp(data, xz_signature, sizeof(xz_signature)) == 0) { lzma_ret xzr; - xzr = lzma_stream_decoder(&c->xz, UINT64_MAX, LZMA_TELL_UNSUPPORTED_CHECK); + xzr = lzma_stream_decoder(&c->xz, UINT64_MAX, LZMA_TELL_UNSUPPORTED_CHECK | LZMA_CONCATENATED); if (xzr != LZMA_OK) return -EIO; -- 2.7.4