We need to clean old entry data in archive_read_next_header2 in Windows
and Posix disk readers to ensure consistent results. One possible
failure mode: sparse data from the previous entry is carried over to
next non-sparse file entry, causing it to be mishandled.
t->entry_fd = -1;
}
+ archive_entry_clear(entry);
+
for (;;) {
r = next_entry(a, t, entry);
if (t->entry_fd >= 0) {
t->entry_fh = INVALID_HANDLE_VALUE;
}
+ archive_entry_clear(entry);
+
while ((r = next_entry(a, t, entry)) == ARCHIVE_RETRY)
archive_entry_clear(entry);