From f3949062edd13da3d0ac330d3226871350f3ff6b Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Tue, 3 Jun 2025 21:59:05 +0200 Subject: [PATCH] rar: Do not forcefully set offset to unpacked size If an entry reaches its end of file, the offset is not necessarily the same as unp_size. This is especially true for links which have a "0 size body" even though the unpacked size is not 0. Signed-off-by: Tobias Stoeckmann --- libarchive/archive_read_support_format_rar.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index 923ae5c65..04dff5b6c 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -1117,8 +1117,6 @@ archive_read_format_rar_read_data(struct archive_read *a, const void **buff, if (rar->entry_eof || rar->offset_seek >= rar->unp_size) { *size = 0; *offset = rar->offset; - if (*offset < rar->unp_size) - *offset = rar->unp_size; return (ARCHIVE_EOF); } -- 2.47.2