Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | buffer |
struct | read_data |
Macros | |
#define | WRITE_FRAGMENT_SIZE (64 * 1024) |
#define | buffer_capacity(buffer) ((buffer)->fragment_offsets[(buffer)->nfragments]) |
#define | buffer_size(buffer) ((buffer)->size) |
Typedefs | |
typedef struct buffer | buffer_t |
Definition at line 69 of file zip_source_buffer.c.
Definition at line 70 of file zip_source_buffer.c.
#define WRITE_FRAGMENT_SIZE (64 * 1024) |
Definition at line 40 of file zip_source_buffer.c.
Definition at line 1 of file zip_source_buffer.c.
|
static |
Definition at line 322 of file zip_source_buffer.c.
References buffer_find_fragment(), buffer_new(), error(), buffer::first_owned_fragment, buffer::fragment_offsets, buffer::fragments, zip_buffer_fragment::length, buffer::nfragments, NULL, buffer::shared_buffer, buffer::shared_fragments, buffer::size, ZIP_ER_INUSE, ZIP_ER_INVAL, ZIP_ER_OPNOTSUPP, zip_error_set(), and ZIP_MIN.
Referenced by read_data().
|
static |
Definition at line 376 of file zip_source_buffer.c.
References buffer::fragment_offsets, and buffer::nfragments.
Referenced by buffer_clone(), and buffer_seek().
|
static |
Definition at line 404 of file zip_source_buffer.c.
References zip_buffer_fragment::data, buffer::first_owned_fragment, buffer::fragment_offsets, buffer::fragments, free(), i, NULL, buffer::shared_buffer, buffer::shared_fragments, and ZIP_MAX.
Referenced by buffer_new(), read_data(), and zip_source_buffer_fragment_with_attributes_create().
|
static |
Definition at line 428 of file zip_source_buffer.c.
References error(), buffer::fragment_offsets, buffer::fragments, buffer::fragments_capacity, NULL, realloc(), ZIP_ER_MEMORY, and zip_error_set().
Referenced by buffer_new(), and buffer_write().
|
static |
Definition at line 453 of file zip_source_buffer.c.
References buffer_free(), buffer_grow_fragments(), zip_buffer_fragment::data, error(), buffer::first_owned_fragment, buffer::fragment_offsets, buffer::fragments, buffer::fragments_capacity, free(), i, length, zip_buffer_fragment::length, malloc(), buffer::nfragments, NULL, buffer::offset, buffer::shared_buffer, buffer::shared_fragments, buffer::size, ZIP_ER_INVAL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by buffer_clone(), read_data(), and zip_source_buffer_fragment_with_attributes_create().
|
static |
Definition at line 513 of file zip_source_buffer.c.
References buffer::current_fragment, zip_buffer_fragment::data, buffer::fragment_offsets, buffer::fragments, i, length, zip_buffer_fragment::length, memcpy(), n, buffer::offset, buffer::size, ZIP_INT64_MAX, and ZIP_MIN.
Referenced by read_data().
|
static |
Definition at line 547 of file zip_source_buffer.c.
References buffer_find_fragment(), buffer::current_fragment, error(), len, buffer::offset, buffer::size, and zip_source_seek_compute_offset().
Referenced by read_data().
|
static |
Definition at line 561 of file zip_source_buffer.c.
References buffer_capacity, buffer_grow_fragments(), buffer::current_fragment, zip_buffer_fragment::data, error(), buffer::fragment_offsets, buffer::fragments, buffer::fragments_capacity, i, length, zip_buffer_fragment::length, malloc(), memcpy(), n, buffer::nfragments, NULL, buffer::offset, buffer::size, WRITE_FRAGMENT_SIZE, ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_set(), and ZIP_MIN.
Referenced by read_data().
|
static |
Definition at line 185 of file zip_source_buffer.c.
References buffer_clone(), buffer_free(), buffer_new(), buffer_read(), buffer_seek(), buffer_write(), cmd, zip_stat::comp_method, zip_stat::comp_size, zip_stat::encryption_method, EOVERFLOW, ctx::error, free(), ctx::in, len, memcpy(), zip_stat::mtime, NULL, ctx::out, zip_stat::size, zip_stat::valid, ZIP_CM_STORE, ZIP_EM_NONE, ZIP_ER_INVAL, ZIP_ER_OPNOTSUPP, ZIP_ER_TELL, zip_error_set(), zip_error_to_data(), ZIP_INT64_MAX, ZIP_SOURCE_BEGIN_WRITE, ZIP_SOURCE_BEGIN_WRITE_CLONING, ZIP_SOURCE_CLOSE, ZIP_SOURCE_COMMIT_WRITE, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, ZIP_SOURCE_GET_FILE_ATTRIBUTES, zip_source_make_command_bitmap(), ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_REMOVE, ZIP_SOURCE_ROLLBACK_WRITE, ZIP_SOURCE_SEEK, ZIP_SOURCE_SEEK_WRITE, ZIP_SOURCE_STAT, ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_TELL_WRITE, ZIP_SOURCE_WRITE, ZIP_STAT_COMP_METHOD, ZIP_STAT_COMP_SIZE, ZIP_STAT_ENCRYPTION_METHOD, zip_stat_init(), ZIP_STAT_MTIME, and ZIP_STAT_SIZE.
ZIP_EXTERN zip_source_t* zip_source_buffer | ( | zip_t * | za, |
const void * | data, | ||
zip_uint64_t | len, | ||
int | freep | ||
) |
Definition at line 88 of file zip_source_buffer.c.
References zip::error, len, NULL, za, and zip_source_buffer_with_attributes_create().
Referenced by add(), main(), replace_file_contents(), rz_io_zip_flush_file(), and zip_dir_add().
ZIP_EXTERN zip_source_t* zip_source_buffer_create | ( | const void * | data, |
zip_uint64_t | len, | ||
int | freep, | ||
zip_error_t * | error | ||
) |
Definition at line 97 of file zip_source_buffer.c.
References error(), len, NULL, and zip_source_buffer_with_attributes_create().
Referenced by LLVMFuzzerTestOneInput(), main(), and read_to_memory().
ZIP_EXTERN zip_source_t* zip_source_buffer_fragment | ( | zip_t * | za, |
const zip_buffer_fragment_t * | fragments, | ||
zip_uint64_t | nfragments, | ||
int | freep | ||
) |
Definition at line 123 of file zip_source_buffer.c.
References zip::error, NULL, za, and zip_source_buffer_fragment_with_attributes_create().
ZIP_EXTERN zip_source_t* zip_source_buffer_fragment_create | ( | const zip_buffer_fragment_t * | fragments, |
zip_uint64_t | nfragments, | ||
int | freep, | ||
zip_error_t * | error | ||
) |
Definition at line 133 of file zip_source_buffer.c.
References error(), NULL, and zip_source_buffer_fragment_with_attributes_create().
Referenced by read_to_memory().
zip_source_t * zip_source_buffer_fragment_with_attributes_create | ( | const zip_buffer_fragment_t * | fragments, |
zip_uint64_t | nfragments, | ||
int | freep, | ||
zip_file_attributes_t * | attributes, | ||
zip_error_t * | error | ||
) |
Definition at line 138 of file zip_source_buffer.c.
References read_data::attributes, buffer_free(), buffer_new(), ctx::error, error(), free(), ctx::in, malloc(), memcpy(), NULL, ctx::out, time, ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_init(), zip_error_set(), zip_file_attributes_init(), and zip_source_function_create().
Referenced by zip_source_buffer_fragment(), zip_source_buffer_fragment_create(), and zip_source_buffer_with_attributes_create().
zip_source_t* zip_source_buffer_with_attributes | ( | zip_t * | za, |
const void * | data, | ||
zip_uint64_t | len, | ||
int | freep, | ||
zip_file_attributes_t * | attributes | ||
) |
Definition at line 180 of file zip_source_buffer.c.
References read_data::attributes, zip::error, len, za, and zip_source_buffer_with_attributes_create().
zip_source_t * zip_source_buffer_with_attributes_create | ( | const void * | data, |
zip_uint64_t | len, | ||
int | freep, | ||
zip_file_attributes_t * | attributes, | ||
zip_error_t * | error | ||
) |
Definition at line 103 of file zip_source_buffer.c.
References zip_buffer_fragment::data, error(), len, zip_buffer_fragment::length, NULL, ZIP_ER_INVAL, zip_error_set(), and zip_source_buffer_fragment_with_attributes_create().
Referenced by _zip_source_zip_new(), zip_source_buffer(), zip_source_buffer_create(), and zip_source_buffer_with_attributes().