diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-06-04 23:25:20 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-06-04 23:25:20 +0000 |
commit | 3cf722bc8127aefb24815e39202bd64bad49ebf5 (patch) | |
tree | 10f3fa6939b1ae45eec17d17b5fe57bdec058130 /lib | |
parent | 396de58967e76528360ff4cfd571105590222fc0 (diff) | |
download | FreeBSD-src-3cf722bc8127aefb24815e39202bd64bad49ebf5.zip FreeBSD-src-3cf722bc8127aefb24815e39202bd64bad49ebf5.tar.gz |
Correctly reset archive_read_data state everytime a header is read.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read.c b/lib/libarchive/archive_read.c index 57923ce..b68b5a6 100644 --- a/lib/libarchive/archive_read.c +++ b/lib/libarchive/archive_read.c @@ -263,6 +263,8 @@ archive_read_next_header(struct archive *a, struct archive_entry **entryp) } *entryp = entry; + a->read_data_output_offset = 0; + a->read_data_remaining = 0; return (ret); } @@ -336,6 +338,9 @@ archive_read_header_position(struct archive *a) * buffer, filling any gaps with zero bytes. Clients using this * API can be completely ignorant of sparse-file issues; sparse files * will simply be padded with nulls. + * + * DO NOT intermingle calls to this function and archive_read_data_block + * to read a single entry body. */ ssize_t archive_read_data(struct archive *a, void *buff, size_t s) |