Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Enumerations | |
enum | exists_t { EXISTS_ERROR = -1 , EXISTS_NOT = 0 , EXISTS_OK } |
enum exists_t |
|
static |
Definition at line 504 of file zip_open.c.
References _zip_new(), zip::ch_flags, error(), flags, zip::flags, NULL, zip::open_flags, zip::src, src, za, ZIP_AFL_RDONLY, and ZIP_RDONLY.
Referenced by _zip_open(), and zip_open_from_source().
|
static |
Definition at line 418 of file zip_open.c.
References _zip_dirent_finalize(), _zip_dirent_init(), _zip_dirent_read(), _zip_ef_merge(), _zip_error_set_from_source(), _zip_headercomp(), _zip_string_length(), ADD_INDEX_TO_DETAIL, cd, error(), zip_dirent::extra_fields, i, LENTRYSIZE, MAKE_DETAIL_WITH_INDEX, max, min, NULL, SEEK_SET, zip::src, za, ZIP_ER_DETAIL_ENTRY_HEADER_MISMATCH, ZIP_ER_INCONS, ZIP_ER_NOZIP, zip_error_code_system(), zip_error_code_zip(), zip_error_set(), ZIP_INT64_MAX, and zip_source_seek().
Referenced by _zip_find_central_dir().
|
static |
Definition at line 525 of file zip_open.c.
References _zip_error_copy(), ENOENT, error(), EXISTS_ERROR, EXISTS_NOT, EXISTS_OK, src, ZIP_ER_READ, zip_error_code_system(), zip_error_code_zip(), zip_source_error(), zip_source_stat(), and zip_stat_init().
Referenced by zip_open_from_source().
|
static |
Definition at line 543 of file zip_open.c.
References _zip_buffer_data(), _zip_buffer_free(), _zip_buffer_get(), _zip_buffer_left(), _zip_buffer_new_from_source(), _zip_buffer_set_offset(), _zip_cdir_free(), _zip_checkcons(), _zip_error_copy(), _zip_error_set_from_source(), _zip_memmem(), _zip_read_cdir(), a, buflen, CDBUFSIZE, EFBIG, EOCD64LOCLEN, EOCD_MAGIC, EOCDLEN, zip::error, error(), len, match, NULL, zip::open_flags, SEEK_END, zip::src, za, ZIP_CHECKCONS, ZIP_ER_NOZIP, ZIP_ER_SEEK, zip_error_code_system(), zip_error_code_zip(), zip_error_set(), zip_source_error(), zip_source_seek(), and zip_source_tell().
Referenced by _zip_open().
|
static |
Definition at line 482 of file zip_open.c.
References _zip_string_equal(), zip_dirent::bitflags, zip_dirent::comp_method, zip_dirent::comp_size, zip_dirent::crc, zip_dirent::filename, zip_dirent::last_mod, local, zip_dirent::uncomp_size, zip_dirent::version_needed, and ZIP_GPBF_DATA_DESCRIPTOR.
Referenced by _zip_checkcons().
|
static |
Definition at line 631 of file zip_open.c.
Referenced by _zip_find_central_dir().
zip_t* _zip_open | ( | zip_source_t * | src, |
unsigned int | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 146 of file zip_open.c.
References _zip_allocate_new(), _zip_error_copy(), _zip_error_set_from_source(), _zip_find_central_dir(), _zip_hash_add(), _zip_hash_reserve_capacity(), _zip_string_get(), zip::ch_flags, zip_cdir::comment, zip::comment_orig, zip::entry, zip_cdir::entry, EOPNOTSUPP, zip::error, error(), zip_dirent::filename, flags, zip::flags, free(), setup::idx, len, zip::names, zip::nentry, zip_cdir::nentry, zip::nentry_alloc, zip_cdir::nentry_alloc, NULL, zip_entry::orig, zip_stat::size, src, zip_stat::valid, za, ZIP_CHECKCONS, zip_discard(), ZIP_ER_EXISTS, ZIP_ER_SEEK, zip_error::zip_err, zip_error_set(), ZIP_FL_UNCHANGED, zip_source_accept_empty(), zip_source_keep(), zip_source_stat(), zip_stat_init(), and ZIP_STAT_SIZE.
Referenced by zip_open_from_source().
|
static |
Definition at line 243 of file zip_open.c.
References _zip_buffer_data(), _zip_buffer_eof(), _zip_buffer_free(), _zip_buffer_get(), _zip_buffer_get_16(), _zip_buffer_left(), _zip_buffer_new(), _zip_buffer_offset(), _zip_buffer_set_offset(), _zip_cdir_free(), _zip_cdir_grow(), _zip_dirent_new(), _zip_dirent_read(), _zip_error_set_from_source(), _zip_read_eocd(), _zip_read_eocd64(), _zip_string_new(), ADD_INDEX_TO_DETAIL, cd, CDENTRYSIZE, EOCD64LOC_MAGIC, EOCD64LOCLEN, EOCD_MAGIC, EOCDLEN, error(), zip::flags, i, MAKE_DETAIL_WITH_INDEX, NULL, ok, zip::open_flags, SEEK_SET, zip::src, while(), za, ZIP_CHECKCONS, ZIP_ER_DETAIL_CDIR_ENTRY_INVALID, ZIP_ER_DETAIL_CDIR_LENGTH_INVALID, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD, ZIP_ER_DETAIL_CDIR_WRONG_ENTRIES_COUNT, ZIP_ER_DETAIL_COMMENT_LENGTH_INVALID, ZIP_ER_INCONS, ZIP_ER_MEMORY, ZIP_ER_NOZIP, zip_error_code_system(), zip_error_code_zip(), zip_error_set(), ZIP_FL_ENC_GUESS, zip_source_seek(), and zip_source_tell().
Referenced by _zip_find_central_dir().
|
static |
Definition at line 647 of file zip_open.c.
References _zip_buffer_get(), _zip_buffer_get_16(), _zip_buffer_get_32(), _zip_buffer_left(), _zip_buffer_offset(), _zip_cdir_new(), cd, EFBIG, EOCDLEN, error(), flags, i, NULL, ZIP_CHECKCONS, ZIP_ER_DETAIL_CDIR_LENGTH_INVALID, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD, ZIP_ER_DETAIL_EOCD_LENGTH_INVALID, ZIP_ER_INCONS, ZIP_ER_MULTIDISK, ZIP_ER_NOZIP, ZIP_ER_SEEK, and zip_error_set().
Referenced by _zip_read_cdir().
|
static |
Definition at line 706 of file zip_open.c.
References _zip_buffer_free(), _zip_buffer_get(), _zip_buffer_get_16(), _zip_buffer_get_32(), _zip_buffer_get_64(), _zip_buffer_new_from_source(), _zip_buffer_offset(), _zip_buffer_ok(), _zip_buffer_set_offset(), _zip_buffer_size(), _zip_cdir_new(), _zip_error_set_from_source(), cd, CDENTRYSIZE, EFBIG, EOCD64_MAGIC, EOCD64LEN, error(), flags, i, NULL, SEEK_SET, src, ZIP_CHECKCONS, ZIP_ER_DETAIL_CDIR_INVALID, ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD, ZIP_ER_DETAIL_EOCD64_MISMATCH, ZIP_ER_DETAIL_EOCD64_OVERLAPS_EOCD, ZIP_ER_DETAIL_EOCD64_WRONG_MAGIC, ZIP_ER_INCONS, ZIP_ER_INTERNAL, ZIP_ER_MULTIDISK, ZIP_ER_SEEK, zip_error_set(), ZIP_INT64_MAX, and zip_source_seek().
Referenced by _zip_read_cdir().
void _zip_set_open_error | ( | int * | zep, |
const zip_error_t * | err, | ||
int | ze | ||
) |
Definition at line 217 of file zip_open.c.
References err, zip_error_code_system(), zip_error_code_zip(), zip_error_system_type(), ZIP_ET_LIBZIP, and ZIP_ET_SYS.
Referenced by zip_fdopen(), and zip_open().
ZIP_EXTERN zip_t* zip_open | ( | const char * | fn, |
int | _flags, | ||
int * | zep | ||
) |
Definition at line 54 of file zip_open.c.
References _zip_set_open_error(), error(), fn, NULL, src, za, zip_error_fini(), zip_error_init(), zip_open_from_source(), zip_source_file_create(), and zip_source_free().
Referenced by add_from_zip(), list_zip(), main(), merge_zip(), read_from_file(), and rz_io_zip_open_archive().
ZIP_EXTERN zip_t* zip_open_from_source | ( | zip_source_t * | src, |
int | _flags, | ||
zip_error_t * | error | ||
) |
Definition at line 79 of file zip_open.c.
References _zip_allocate_new(), _zip_error_set_from_source(), _zip_file_exists(), _zip_open(), error(), EXISTS_ERROR, EXISTS_NOT, flags, int, NULL, src, za, ZIP_CREATE, ZIP_ER_EXISTS, ZIP_ER_INVAL, ZIP_ER_NOENT, ZIP_ER_OPNOTSUPP, ZIP_ER_RDONLY, zip_error_set(), ZIP_EXCL, ZIP_RDONLY, zip_source_close(), zip_source_open(), zip_source_supports(), ZIP_SOURCE_SUPPORTS_SEEKABLE, ZIP_SOURCE_SUPPORTS_WRITABLE, and ZIP_TRUNCATE.
Referenced by LLVMFuzzerTestOneInput(), main(), read_from_file(), read_hole(), read_to_memory(), windows_open(), zip_fdopen(), and zip_open().