aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_disk_entry_from_file.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
committerMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
commit87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9 (patch)
treeb8ac4af3d780f51917c8a060892b1633cce98aca /libarchive/archive_read_disk_entry_from_file.c
parent659b8836cb5cd1ff479c8644211f190e1ad9619d (diff)
downloadsrc-87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9.tar.gz
src-87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9.zip
Update vendor/libarchive to git c253f0aae9ac86a617b4f814137e07757df72391
Vendor changes (FreeBSD-related): PR 897: test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=317781
Diffstat (limited to 'libarchive/archive_read_disk_entry_from_file.c')
-rw-r--r--libarchive/archive_read_disk_entry_from_file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
index 700f9e3ae1af..548ba89ef3db 100644
--- a/libarchive/archive_read_disk_entry_from_file.c
+++ b/libarchive/archive_read_disk_entry_from_file.c
@@ -928,11 +928,10 @@ setup_sparse(struct archive_read_disk *a,
return (ARCHIVE_OK);
/* Does filesystem support the reporting of hole ? */
- if (*fd < 0) {
+ if (*fd < 0)
path = archive_read_disk_entry_setup_path(a, entry, fd);
- if (path == NULL)
- return (ARCHIVE_FAILED);
- }
+ else
+ path = NULL;
if (*fd >= 0) {
#ifdef _PC_MIN_HOLE_SIZE
@@ -943,6 +942,8 @@ setup_sparse(struct archive_read_disk *a,
if (initial_off != 0)
lseek(*fd, 0, SEEK_SET);
} else {
+ if (path == NULL)
+ return (ARCHIVE_FAILED);
#ifdef _PC_MIN_HOLE_SIZE
if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0)
return (ARCHIVE_OK);