From 224a6306e93482216b6e59b50e937a120b38b3ab Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 16 Feb 2021 01:20:29 +1100 Subject: [PATCH] Put a workaround to possibly read previously corrupted archives missing lzma properties. --- lrzip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lrzip.c b/lrzip.c index b260a50..b7f5501 100644 --- a/lrzip.c +++ b/lrzip.c @@ -218,6 +218,9 @@ static bool get_magic(rzip_control *control, char *magic) if ((int) magic[16]) { for (i = 0; i < 5; i++) control->lzma_properties[i] = magic[i + 16]; + /* Cludge to allow us to read possibly corrupted archives */ + if (!control->lzma_properties[0]) + control->lzma_properties[0] = 93; } /* Whether this archive contains md5 data at the end or not */