]> git.ipfire.org Git - thirdparty/libarchive.git/commit
rar: convert remaining per-entry data errors to ARCHIVE_FAILED
authorTim Kientzle <kientzle@acm.org>
Sun, 3 May 2026 23:25:55 +0000 (16:25 -0700)
committerTim Kientzle <kientzle@acm.org>
Tue, 5 May 2026 20:39:27 +0000 (13:39 -0700)
commit6fec0b68cd1cf1039f590328cd0b1708af2b00d1
tree68a86eedf82d4e6eafa84ff490074ddef86f0ca9
parent47c07e89488cc081f03833f1be81d6f1d3b2242b
rar: convert remaining per-entry data errors to ARCHIVE_FAILED

Follow-up to 4f148608.  A code review found additional ARCHIVE_FATAL
returns in RAR4 data-decode paths that should be ARCHIVE_FAILED so the
caller can move on to the next entry:

  read_data_block      Truncated RAR file data
  read_data_compressed PPMd "Invalid symbol" (3 sites)
  parse_codes          Zero window size is invalid
  add_value            Prefix found (second site)
  make_table_recurse   Huffman tree was not created
  make_table_recurse   Invalid location to Huffman tree specified

These are all per-entry parse/decode failures.  As with the earlier
batch, the rar4 input position is tracked by rar_br_fillup so
read_data_skip will correctly advance past the damaged entry, and
RAR4 solid mode is not supported, so subsequent entries are not at
risk from a half-consumed shared decoder state.
libarchive/archive_read_support_format_rar.c