]> git.ipfire.org Git - thirdparty/libarchive.git/commit
rar5: don't continue if the last block produced no data (#2105)
authorDuncan Horn <40036384+dunhor@users.noreply.github.com>
Mon, 1 Apr 2024 18:13:19 +0000 (11:13 -0700)
committerGitHub <noreply@github.com>
Mon, 1 Apr 2024 18:13:19 +0000 (20:13 +0200)
commit77b783226d03f5ffd13790f94489828d10964f82
treebaf4961c70cf53b07a1c4990e0e91799aa59a355
parent04512b5b89717233073b00f1400294a4a89a3938
rar5: don't continue if the last block produced no data (#2105)

There appear to be RAR5 archives out in the wild that have blocks at the
end of files that don't produce any data. The code in libarchive has an
infinite loop that won't break until it processes a block that produces
data, which will end up reading past the end of the file if the last
block in the file produces no data.
libarchive/archive_read_support_format_rar5.c