aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_warc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_read_support_format_warc.c')
-rw-r--r--libarchive/archive_read_support_format_warc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c
index e8753853f3c8..e8fc8428b41e 100644
--- a/libarchive/archive_read_support_format_warc.c
+++ b/libarchive/archive_read_support_format_warc.c
@@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, size_t *bsz, int64_t *off)
return (ARCHIVE_EOF);
}
+ if (w->unconsumed) {
+ __archive_read_consume(a, w->unconsumed);
+ w->unconsumed = 0U;
+ }
+
rab = __archive_read_ahead(a, 1U, &nrd);
if (nrd < 0) {
*bsz = 0U;