From: Tobias Stoeckmann Date: Tue, 3 Jun 2025 19:59:05 +0000 (+0200) Subject: rar: Do not forcefully set offset to unpacked size X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3949062edd13da3d0ac330d3226871350f3ff6b;p=thirdparty%2Flibarchive.git 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 --- 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); }