1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Con Kolivas <kernel@kolivas.org>
Date: Tue, 12 Apr 2022 19:05:59 +1000
Subject: [PATCH] Check for invalid repeated head that can lead to infinite
loop in info mode.
Origin: upstream, https://github.com/ckolivas/lrzip/commit/3495188cd8f2215a9feea201f3e05c1341ed95fb
---
lrzip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lrzip.c b/lrzip.c
index f938a1b..354a88c 100644
--- a/lrzip.c
+++ b/lrzip.c
@@ -1059,7 +1059,7 @@ next_chunk:
do {
i64 head_off;
- if (unlikely(last_head && last_head < second_last))
+ if (unlikely(last_head && last_head <= second_last))
failure_goto(("Invalid earlier last_head position, corrupt archive.\n"), error);
second_last = last_head;
if (unlikely(last_head + ofs > infile_size))
|