]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
xar: fix bad seek in move_reading_point()
authorGrzegorz Antoniak <ga@anadoxin.org>
Thu, 15 Feb 2018 17:15:32 +0000 (18:15 +0100)
committerGrzegorz Antoniak <ga@anadoxin.org>
Thu, 15 Feb 2018 17:15:32 +0000 (18:15 +0100)
libarchive/archive_read_support_format_xar.c

index 602fc77221444ace07bbc77e2cc517dea0afd9e3..4c3d50a105adad5590e7ad84cdd9ca338488dba4 100644 (file)
@@ -967,7 +967,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,