aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-04-10 21:46:28 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-04-10 21:46:28 +0000
commit23980249b8fc78eedcce66eb0cfa88b16512c917 (patch)
tree0e0cb43488667ead9778bacd50f5d085a676ba7a /contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
parentb67bed92852b385975cc6495720ae45f2c3b99b6 (diff)
downloadsrc-23980249b8fc78eedcce66eb0cfa88b16512c917.tar.gz
src-23980249b8fc78eedcce66eb0cfa88b16512c917.zip
MFC r345497:
Sync libarchive with vendor. Relevant vendor changes: PR #1153: fixed 2 bugs in ZIP reader [1] PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK Changes to file flags code, support more file flags on FreeBSD: UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM UF_ARCHIVE is not supported by intention (yet) PR: 236300 [1]
Notes
Notes: svn path=/stable/10/; revision=346105
Diffstat (limited to 'contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c')
-rw-r--r--contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
index 2f4a20382043..9700607cb0f9 100644
--- a/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
+++ b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c
@@ -163,6 +163,9 @@ archive_read_disk_entry_from_file(struct archive *_a,
int initial_fd = fd;
int r, r1;
+ archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC, ARCHIVE_STATE_ANY,
+ "archive_read_disk_entry_from_file");
+
archive_clear_error(_a);
path = archive_entry_sourcepath(entry);
if (path == NULL)