]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
xar: End with entry offset, not archive offset
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 3 Jun 2025 19:57:05 +0000 (21:57 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 3 Jun 2025 19:57:05 +0000 (21:57 +0200)
If xar_read_data has no further data, set offset to end of entry,
not to total size of parsed archive so far.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_support_format_xar.c

index b4e1192ef771026423517be6de9ca0a7fc46dda7..36b5ab3ae04c8508d2376cc5f477c3f2e8b4a399 100644 (file)
@@ -930,7 +930,7 @@ xar_read_data(struct archive_read *a,
 abort_read_data:
        *buff = NULL;
        *size = 0;
-       *offset = xar->total;
+       *offset = (int64_t)xar->entry_total;
        return (r);
 }