From 9fa772abe4266f52ebdc5b3bbdf7709cf9446261 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sun, 3 May 2026 15:21:21 -0700 Subject: [PATCH] rar5: return ARCHIVE_FAILED (not ARCHIVE_FATAL) for per-entry data errors Two per-entry errors in the RAR5 data-reading path were returning ARCHIVE_FATAL, preventing iteration over subsequent entries: - "Reading encrypted data is not currently supported": the encryption is per-entry; unencrypted entries in the same archive remain readable. - "Invalid filter encountered": a malformed filter spec in one entry does not make the rest of the archive unreadable. Change both to ARCHIVE_FAILED. --- libarchive/archive_read_support_format_rar5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c index 63dd97b30..9b263110c 100644 --- a/libarchive/archive_read_support_format_rar5.c +++ b/libarchive/archive_read_support_format_rar5.c @@ -3050,7 +3050,7 @@ static int parse_filter(struct archive_read* ar, const uint8_t* p) { { archive_set_error(&ar->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Invalid filter encountered"); - return ARCHIVE_FATAL; + return ARCHIVE_FAILED; } /* Allocate a new filter. */ @@ -4207,7 +4207,7 @@ static int rar5_read_data(struct archive_read *a, const void **buff, if (rar->headers_are_encrypted || rar->cstate.data_encrypted) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Reading encrypted data is not currently supported"); - return ARCHIVE_FATAL; + return ARCHIVE_FAILED; } if(rar->file.dir > 0) { -- 2.47.3