From: Grzegorz Antoniak Date: Thu, 15 Feb 2018 17:15:32 +0000 (+0100) Subject: xar: fix bad seek in move_reading_point() X-Git-Tag: v3.4.0~175^2~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a837b80fe94cec2aeee77751a9b14386167c509;p=thirdparty%2Flibarchive.git xar: fix bad seek in move_reading_point() --- diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c index 602fc7722..4c3d50a10 100644 --- a/libarchive/archive_read_support_format_xar.c +++ b/libarchive/archive_read_support_format_xar.c @@ -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,