From 3495188cd8f2215a9feea201f3e05c1341ed95fb Mon Sep 17 00:00:00 2001 From: Con Kolivas 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. --- lrzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lrzip.c b/lrzip.c index 03a7962..3d55db8 100644 --- a/lrzip.c +++ b/lrzip.c @@ -1093,7 +1093,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))