diff --git a/lib/libarchive/archive_write_set_compression_gzip.c b/lib/libarchive/archive_write_set_compression_gzip.c index ca55410d25be..003cf2b55895 100644 --- a/lib/libarchive/archive_write_set_compression_gzip.c +++ b/lib/libarchive/archive_write_set_compression_gzip.c @@ -308,6 +308,7 @@ archive_compressor_gzip_finish(struct archive *a) /* Write the last block */ ret = (a->client_writer)(a, a->client_data, state->compressed, block_length); + a->raw_position += ret; /* Cleanup: shut down compressor, release memory, etc. */ cleanup: diff --git a/lib/libarchive/archive_write_set_compression_none.c b/lib/libarchive/archive_write_set_compression_none.c index 99347b04fdf5..7a598c688272 100644 --- a/lib/libarchive/archive_write_set_compression_none.c +++ b/lib/libarchive/archive_write_set_compression_none.c @@ -195,6 +195,7 @@ archive_compressor_none_finish(struct archive *a) } ret = (a->client_writer)(a, a->client_data, state->buffer, block_length); + a->raw_position += ret; } /* Close the output */