]> git.ipfire.org Git - thirdparty/libarchive.git/commit
archive_read: fix handling of sparse files
authorDmitry Torokhov <dtor@chromium.org>
Tue, 25 Jun 2019 17:09:44 +0000 (10:09 -0700)
committerDmitry Torokhov <dtor@chromium.org>
Wed, 26 Jun 2019 17:29:52 +0000 (10:29 -0700)
commitaa48bfac0f4ede8a6a4dfa545ad91684b41a9285
tree67a6222651baa1fb2a9653e4d0b6d356ca081483
parenta163558c388bb2ccedef683e8031c11193e6875c
archive_read: fix handling of sparse files

If a file ends with a sparse "hole" that is larger than buffer supplied
to archive_read(), then archive_read() will return prematurely because
archive_read_data_block() will return ARHCIVE_EOF as there is no more
"real" data. We can fix that by not trying to refill data buffer until
we exhaust the hole range.

Fixes libarchive#1194
libarchive/archive_read.c