From bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Aug 2017 11:52:42 +0200 Subject: libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1 function old new delta unsafe_symlink_target - 147 +147 unzip_main 2711 2732 +21 copy_file 1657 1678 +21 tar_main 999 971 -28 data_extract_all 1038 984 -54 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/2 up/down: 189/-82) Total: 107 bytes Signed-off-by: Denys Vlasenko --- include/bb_archive.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/bb_archive.h') diff --git a/include/bb_archive.h b/include/bb_archive.h index d3762415f..d3a02cf18 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h @@ -64,9 +64,6 @@ typedef struct archive_handle_t { /* Currently processed file's header */ file_header_t *file_header; - /* List of symlink placeholders */ - llist_t *symlink_placeholders; - /* Process the header component, e.g. tar -t */ void FAST_FUNC (*action_header)(const file_header_t *); @@ -200,6 +197,7 @@ void seek_by_jump(int fd, off_t amount) FAST_FUNC; void seek_by_read(int fd, off_t amount) FAST_FUNC; const char *strip_unsafe_prefix(const char *str) FAST_FUNC; +int unsafe_symlink_target(const char *target) FAST_FUNC; void data_align(archive_handle_t *archive_handle, unsigned boundary) FAST_FUNC; const llist_t *find_list_entry(const llist_t *list, const char *filename) FAST_FUNC; -- cgit v1.2.3