aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_read.c')
-rw-r--r--libarchive/archive_read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c
index de964f253284..5872601101ba 100644
--- a/libarchive/archive_read.c
+++ b/libarchive/archive_read.c
@@ -844,7 +844,8 @@ archive_read_data(struct archive *_a, void *buff, size_t s)
dest = (char *)buff;
while (s > 0) {
- if (a->read_data_remaining == 0) {
+ if (a->read_data_offset == a->read_data_output_offset &&
+ a->read_data_remaining == 0) {
read_buf = a->read_data_block;
a->read_data_is_posix_read = 1;
a->read_data_requested = s;