Check for invalid repeated head that can lead to infinite loop in info mode.

This commit is contained in:
Con Kolivas 2022-04-12 19:05:59 +10:00
parent e5e9a61fcc
commit 3495188cd8

View file

@ -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))