]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix for GitHub issue 998.
authorGrzegorz Antoniak <ga@anadoxin.org>
Mon, 26 Feb 2018 19:26:33 +0000 (20:26 +0100)
committerMartin Matuska <martin@matuska.org>
Sat, 6 Oct 2018 20:50:20 +0000 (22:50 +0200)
libarchive/archive_read_support_format_xar.c

index 5933fce919c05faa09e0d9cd5e12c8a7b6e5bb15..c4dd915a2c0e25855bf22d7b529b61b1965cdb87 100644 (file)
@@ -976,7 +976,7 @@ move_reading_point(struct archive_read *a, uint64_t offset)
                                return ((int)step);
                        xar->offset += step;
                } else {
-                       int64_t pos = __archive_read_seek(a, offset, SEEK_SET);
+                       int64_t pos = __archive_read_seek(a, xar->h_base + offset, SEEK_SET);
                        if (pos == ARCHIVE_FAILED) {
                                archive_set_error(&(a->archive),
                                    ARCHIVE_ERRNO_MISC,